Add agenix-rekey module + rekey config back to lazyworkhorse

agenix-rekey auto-re-encrypts secrets per host at build time:
- Encrypted once in git with master identity
- Re-encrypted for each host using their SSH host key
- No manual multi-recipient encryption needed
This commit is contained in:
2026-06-22 00:05:22 -04:00
parent 9bf38f1077
commit 24761b58b2
3 changed files with 11 additions and 2 deletions

View File

@@ -262,6 +262,7 @@
} }
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
agenix.nixosModules.default agenix.nixosModules.default
agenix-rekey.nixosModules.default
./hosts/lazyworkhorse/configuration.nix ./hosts/lazyworkhorse/configuration.nix
./hosts/lazyworkhorse/hardware-configuration.nix ./hosts/lazyworkhorse/hardware-configuration.nix
./modules/nixos/filesystem/hoardingcow-mount.nix ./modules/nixos/filesystem/hoardingcow-mount.nix

View File

@@ -589,3 +589,9 @@
} }
# agenix-rekey — automatic re-encryption for each target host
age.rekey = {
masterIdentities = [
"/home/gortium/.ssh/gortium_ssh_key"
];
};

View File

@@ -12,5 +12,7 @@ in
"home_wifi.age".publicKeys = authorizedKeys; "home_wifi.age".publicKeys = authorizedKeys;
"lazyworkhorse_host_ssh_key.age".publicKeys = authorizedKeys; "lazyworkhorse_host_ssh_key.age".publicKeys = authorizedKeys;
"n8n_ssh_key.age".publicKeys = authorizedKeys; "n8n_ssh_key.age".publicKeys = authorizedKeys;
"builder_key.age".publicKeys = authorizedKeys; "builder_key.age".publicKeys = authorizedKeys ++ [
keys.hosts.uConsole.bootstrap
];
} }