浏览代码

fix: relocate control-pat secret to shared home path, enable agenix on odin

Zander Hawke 1 天之前
父节点
当前提交
b6f06475a9
共有 5 个文件被更改,包括 113 次插入14 次删除
  1. 98 8
      flake.lock
  2. 1 1
      home/features/cli/git.nix
  3. 0 4
      home/features/nvim/default.nix
  4. 1 1
      home/meili.nix
  5. 13 0
      home/odin.nix

+ 98 - 8
flake.lock

@@ -257,6 +257,24 @@
         "type": "github"
       }
     },
+    "flake-utils_2": {
+      "inputs": {
+        "systems": "systems_3"
+      },
+      "locked": {
+        "lastModified": 1731533236,
+        "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
+        "owner": "numtide",
+        "repo": "flake-utils",
+        "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
+        "type": "github"
+      },
+      "original": {
+        "owner": "numtide",
+        "repo": "flake-utils",
+        "type": "github"
+      }
+    },
     "ghostty": {
       "flake": false,
       "locked": {
@@ -498,6 +516,28 @@
         "url": "https://gitnostr.com/npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr/ngit-grasp.git"
       }
     },
+    "ngit-grasp_2": {
+      "inputs": {
+        "flake-utils": "flake-utils_2",
+        "nixpkgs": [
+          "nixpkgs-unstable"
+        ],
+        "rust-overlay": "rust-overlay_3"
+      },
+      "locked": {
+        "lastModified": 1781621434,
+        "narHash": "sha256-BjxSGjvPIjJhShwsadEhORhDKgwRqnI0J7LCIopYLac=",
+        "ref": "refs/heads/master",
+        "rev": "90bd544915be6b2f78c7b61d035ea32ce89de4f2",
+        "revCount": 649,
+        "type": "git",
+        "url": "https://gitnostr.com/npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr/ngit-grasp.git"
+      },
+      "original": {
+        "type": "git",
+        "url": "https://gitnostr.com/npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr/ngit-grasp.git"
+      }
+    },
     "nix": {
       "inputs": {
         "flake-compat": [
@@ -644,6 +684,22 @@
       }
     },
     "nixpkgs_3": {
+      "locked": {
+        "lastModified": 1744536153,
+        "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
+        "owner": "NixOS",
+        "repo": "nixpkgs",
+        "rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11",
+        "type": "github"
+      },
+      "original": {
+        "owner": "NixOS",
+        "ref": "nixpkgs-unstable",
+        "repo": "nixpkgs",
+        "type": "github"
+      }
+    },
+    "nixpkgs_4": {
       "locked": {
         "lastModified": 1781216227,
         "narHash": "sha256-9mUW6gNwoN2SWc/l0fW4svPNOulXLl8ijqKyeSOGgJE=",
@@ -659,7 +715,7 @@
         "type": "github"
       }
     },
-    "nixpkgs_4": {
+    "nixpkgs_5": {
       "locked": {
         "lastModified": 1780453794,
         "narHash": "sha256-bXMRa9VTsHSPXL4Cw8R6JJLQeY3Y/IP4+YJCYVmQ7FY=",
@@ -678,8 +734,8 @@
     "nixvim": {
       "inputs": {
         "flake-parts": "flake-parts_2",
-        "nixpkgs": "nixpkgs_4",
-        "systems": "systems_3"
+        "nixpkgs": "nixpkgs_5",
+        "systems": "systems_4"
       },
       "locked": {
         "lastModified": 1781531135,
@@ -706,8 +762,9 @@
         "home-manager": "home-manager_2",
         "impermanence": "impermanence",
         "ngit-cli": "ngit-cli",
+        "ngit-grasp": "ngit-grasp_2",
         "nixos-facter-modules": "nixos-facter-modules",
-        "nixpkgs": "nixpkgs_3",
+        "nixpkgs": "nixpkgs_4",
         "nixpkgs-darwin": "nixpkgs-darwin",
         "nixpkgs-unstable": "nixpkgs-unstable",
         "nixvim": "nixvim",
@@ -753,13 +810,31 @@
         "type": "github"
       }
     },
+    "rust-overlay_3": {
+      "inputs": {
+        "nixpkgs": "nixpkgs_3"
+      },
+      "locked": {
+        "lastModified": 1781580018,
+        "narHash": "sha256-BlTedbM77FmesD2ZqR73vhFy+y77UrhefV7IYw1pDsk=",
+        "owner": "oxalica",
+        "repo": "rust-overlay",
+        "rev": "8bceba21a1ebea535c27c4dc723a0d5a4db9e386",
+        "type": "github"
+      },
+      "original": {
+        "owner": "oxalica",
+        "repo": "rust-overlay",
+        "type": "github"
+      }
+    },
     "secrets": {
       "locked": {
-        "lastModified": 1781953871,
-        "narHash": "sha256-Huf0eJzhXWjApux33mjij7C7ZH6+RpaO9ERvzTNpygg=",
+        "lastModified": 1781967054,
+        "narHash": "sha256-E6RZE0NQgTX83771X7XAE004C9tb0FODYxAe5WiqdZI=",
         "ref": "refs/heads/master",
-        "rev": "bb868d5b1cf6ee8d8f3bce1ff17e53c0b5864604",
-        "revCount": 28,
+        "rev": "9750060078d29bf3943f6fcd77842375e9adf855",
+        "revCount": 30,
         "type": "git",
         "url": "ssh://[email protected]/control/secrets.git"
       },
@@ -813,6 +888,21 @@
         "type": "github"
       }
     },
+    "systems_4": {
+      "locked": {
+        "lastModified": 1681028828,
+        "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+        "owner": "nix-systems",
+        "repo": "default",
+        "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nix-systems",
+        "repo": "default",
+        "type": "github"
+      }
+    },
     "treefmt-nix": {
       "inputs": {
         "nixpkgs": [

+ 1 - 1
home/features/cli/git.nix

@@ -19,7 +19,7 @@ let
     };
 
     credential."https://git.t5.st" = {
-      helper = "store --file ${config.age.secrets."meili/control-pat".path}";
+      helper = "store --file ${config.age.secrets."home/control-pat".path}";
     };
   };
 

+ 0 - 4
home/features/nvim/default.nix

@@ -9,10 +9,6 @@
 
   home.packages = [ pkgs.unstable.opencode ];
 
-  # programs.fish.interactiveShellInit = ''
-  #   set OPENROUTER_API_KEY $(cat ${config.age.secrets."meili/openrouter".path})
-  # '';
-
   programs.nixvim = {
     enable = true;
     defaultEditor = true;

+ 1 - 1
home/meili.nix

@@ -39,7 +39,7 @@ in
   # FIXME: change this to a different identity
   age.identityPaths = [ "/Users/thomas/.ssh/builder_ed25519" ];
   age.secrets = {
-    "meili/control-pat".file = secrets."meili/control-pat.age";
+    "home/control-pat".file = secrets."home/control-pat.age";
     "meili/openrouter".file = secrets."meili/openrouter.age";
   };
 }

+ 13 - 0
home/odin.nix

@@ -1,7 +1,20 @@
+{
+  inputs,
+  ...
+}:
+let
+  secrets = inputs.secrets.secrets;
+in
 {
   imports = [
+    inputs.agenix.homeManagerModules.default
+
     ./features/core.nix
     ./features/cli
     ./features/nvim
   ];
+
+  age.secrets = {
+    "home/control-pat".file = secrets."home/control-pat.age";
+  };
 }