From 8ee4c2b758c5970cfce396056185b7f1f0c32e84 Mon Sep 17 00:00:00 2001 From: Tao Tien <29749622+taotien@users.noreply.github.com> Date: Thu, 28 Mar 2024 23:57:47 -0500 Subject: [PATCH] figured out agenix --- flake.lock | 24 ++++++++++++------------ secrets/secrets.nix | 9 +++++---- secrets/syncthing-NOcomputer.age | Bin 276 -> 276 bytes secrets/uwuraid.age | 9 +++++---- users/tao.nix | 23 ++++++++++++++++------- users/tao/nushell/stuff.nu | 4 ++-- 6 files changed, 40 insertions(+), 29 deletions(-) diff --git a/flake.lock b/flake.lock index 9e41f68..0df4fe1 100644 --- a/flake.lock +++ b/flake.lock @@ -104,11 +104,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1711561478, - "narHash": "sha256-eqQ+4cR3ucML1+Wy8LbHfpEkUqYNVHN/2p5PBibQAYw=", + "lastModified": 1711723484, + "narHash": "sha256-lRF/0zfF4jwsUvJAbl7D4pQRxpqrTCJaEMZ7DvPOw60=", "owner": "the-mikedavis", "repo": "helix", - "rev": "eb77bef47562f88604756a946d97a22a3fed68ff", + "rev": "22e2d20ac058efb86c4ca35a6d221f92eedc8f3b", "type": "github" }, "original": { @@ -145,11 +145,11 @@ ] }, "locked": { - "lastModified": 1711604890, - "narHash": "sha256-vbI/gxRTq/gHW1Q8z6D/7JG/qGNl3JTimUDX+MwnC3A=", + "lastModified": 1711625603, + "narHash": "sha256-W+9dfqA9bqUIBV5u7jaIARAzMe3kTq/Hp2SpSVXKRQw=", "owner": "nix-community", "repo": "home-manager", - "rev": "3142bdcc470e1e291e1fbe942fd69e06bd00c5df", + "rev": "c0ef0dab55611c676ad7539bf4e41b3ec6fa87d2", "type": "github" }, "original": { @@ -189,11 +189,11 @@ "rust-overlay": "rust-overlay_2" }, "locked": { - "lastModified": 1711590786, - "narHash": "sha256-oeWqmHDAreQo5PqVIG2hSDnihi6SXqSvNhCZN4fHNvs=", + "lastModified": 1711716489, + "narHash": "sha256-4ksCvWUNxWRfVqwlBoSZw7DKY4mClSzQ7zh+IhtA8xg=", "owner": "martinvonz", "repo": "jj", - "rev": "916dc30828b76a7cc576a5acfc88dd6ee9a25feb", + "rev": "dd1def02e487a2a43903aa88022b266a3ecbef4d", "type": "github" }, "original": { @@ -210,11 +210,11 @@ ] }, "locked": { - "lastModified": 1711599780, - "narHash": "sha256-oBeOUfEgR4IWYLqsE+/WFEXQ/AjQo9hGVWV9f2XqfI4=", + "lastModified": 1711676942, + "narHash": "sha256-hK5VXks2KsaGVxxvS6rd0RwMFiKwCArGF1dN2ZgyMSU=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "1e17eab80fe3fc882e0cfdd84a1b9c20ebc65b26", + "rev": "a889b24ecc71208a2ac6a81368f59dc6a89ab204", "type": "github" }, "original": { diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 644da3b..c33bbb7 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -1,7 +1,8 @@ let - tao-NOlaptop = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINimJXI8WOYUMwfAcGyKB9EYtuaClNjeEH4ZTQl9tuUY"; - users = [tao-NOlaptop]; + NOlaptop = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGFACYTHNr0dgtTe8cb6q+NwI1KaKJmNsUrnz5/8ZDvH"; + systems = [NOlaptop]; in { - "uwuraid.age".publicKeys = users; - "syncthing-NOcomputer.age".publicKeys = users; + "uwuraid.age".publicKeys = systems; + "syncthing-NOcomputer.age".publicKeys = systems; + "syncthing-NOlaptop.age".publicKeys = systems; } diff --git a/secrets/syncthing-NOcomputer.age b/secrets/syncthing-NOcomputer.age index 7228a5db5732a3461bddb012fc817b578a025d4e..6ba1aef3cc51854b70b50e370dfb3cd3d7b1f7fc 100644 GIT binary patch delta 247 zcmV5#cX(wtQ%^HR3UqE#Nn=@bLpW(`XHr*dN^fjqa%@L2Ggd27V^KtRY(pzTMmIQP zcx-WJ3N0-yAV_gnLpWAbIc#iXPGU26S9e)5S8--FO+rOtLvTh$O;B`rZ8I=oOfOb8 zFbecp5~zg*cAg>#X*|mPs6r))i#Y^ug+hum#s$1e(hp1XWg&E;7)`PZSe1Xx?Ie|$ xy4C@U$bdgpf~o1KC|6#Py`~Rt+TU*I)yd{;+vA<*McG(6eYkwMqAN83B{8vVUOoT- delta 247 zcmV_8QFN+=I%8cmF=MYEUw@b{(Og+5Q* xcTBujY3$SDpqeV0(nJ@7-QD9d+AEkYJb ssh-ed25519 hvSR/A ppOgIpREfIuU2qRX0Zk2RS3TSD+ZgvvzqNB/7V1wAgc -GzDSBWn2X7eoswGQe24TyK6VGE6h4jrZFi5OaNBNI3g ---- KCCs0c1oBkdKXBlhmOs/OMXeH6MCOatfWYeghZhAdcU -{!}+PK>H<#d,ܣGTOicZU1x&qKEwMg3$FQg*& \ No newline at end of file +-> ssh-ed25519 iNXO0g z8i2LWg5PYpBr0J9bUZvwi6M5YLqHvSxUCMjJEKJTmE +aM9v+oYgyQU/B1r5T80ulxYKeypCs7Ns2UzN0hgcbbc +--- F4vnTP/zRtsCIWmEzXbOnE0RjHzdSaamlmpmYJOy914 +W9IV>o¦RWJNw%p8!x& +CO{p jf/ \ No newline at end of file diff --git a/users/tao.nix b/users/tao.nix index 8c0e486..ee6ee31 100644 --- a/users/tao.nix +++ b/users/tao.nix @@ -21,7 +21,7 @@ # texlab # tio # toastify - # vial + vial # wkhtmltopdf # yazi appimage-run @@ -85,14 +85,23 @@ overrideFolders = false; settings = { devices = { - # # we do a lil anti-patterns https://github.com/ryantm/agenix?tab=readme-ov-file#builtinsreadfile-anti-pattern - # # bootstrap by commenting out devices first, and running nixos-rebuild as user - # "nocomputer".id = builtins.readFile config.age.secrets.syncthing-NOcomputer.path; + # we do a lil anti-patterns https://github.com/ryantm/agenix?tab=readme-ov-file#builtinsreadfile-anti-pattern + # bootstrap by commenting out devices first and rebuild switch impurely + "nocomputer".id = builtins.readFile config.age.secrets.syncthing-NOcomputer.path; }; folders = { - "sync".path = "/home/tao/sync"; - "school".path = "/home/tao/school"; - "projects".path = "/home/tao/projects"; + "sync" = { + path = "/home/tao/sync"; + devices = ["nocomputer"]; + }; + "school" = { + path = "/home/tao/school"; + devices = ["nocomputer"]; + }; + "projects" = { + path = "/home/tao/projects"; + devices = ["nocomputer"]; + }; # "pictures".path = "/home/tao/pictures"; }; }; diff --git a/users/tao/nushell/stuff.nu b/users/tao/nushell/stuff.nu index 63702c6..c445c60 100644 --- a/users/tao/nushell/stuff.nu +++ b/users/tao/nushell/stuff.nu @@ -8,8 +8,8 @@ alias gc = sudo nix-collect-garbage -d alias js = jj status alias jd = jj diff alias pu = pueue -alias rb = sudo nice -n19 nixos-rebuild boot --flake . -alias rs = sudo nice -n19 nixos-rebuild switch --flake . +alias rb = sudo nice -n19 nixos-rebuild boot --flake . --impure +alias rs = sudo nice -n19 nixos-rebuild switch --flake . --impure alias t = task alias ts = tailscale alias tss = tailscale status