refactor(nixos): externalize SSH client keys

This commit is contained in:
2026-10-07 19:34:54 -04:00
parent 206bb58073
commit 7559d061fd
4 changed files with 7 additions and 3 deletions

View File

@@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGxQ4kWsBo2OGYIPOkFe0vNEcB3yoJwAu0y9wrdQzALE alexion@neogaia

View File

@@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINNqJIC6VRXyvrNf3n9su9KdPCikC3CjK/QrCK2reHdB alexion@pikachu

View File

@@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIRBcHHuubptXCdvED/p2dR3MpjGN/AimqLasLY5984G alexion@zeus

View File

@@ -37,22 +37,23 @@ let
neogaia = { neogaia = {
hostName = registry.address.neogaia.self; hostName = registry.address.neogaia.self;
clientKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGxQ4kWsBo2OGYIPOkFe0vNEcB3yoJwAu0y9wrdQzALE alexion@neogaia"; clientKey = clientKeyFor "neogaia";
hostKeys = hostKeysFor "neogaia"; hostKeys = hostKeysFor "neogaia";
}; };
zeus = { zeus = {
hostName = registry.address.zeus.self; hostName = registry.address.zeus.self;
clientKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIRBcHHuubptXCdvED/p2dR3MpjGN/AimqLasLY5984G alexion@zeus"; clientKey = clientKeyFor "zeus";
hostKeys = hostKeysFor "zeus"; hostKeys = hostKeysFor "zeus";
}; };
pikachu = { pikachu = {
hostName = registry.address.pikachu.self; hostName = registry.address.pikachu.self;
clientKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINNqJIC6VRXyvrNf3n9su9KdPCikC3CjK/QrCK2reHdB alexion@pikachu"; clientKey = clientKeyFor "pikachu";
hostKeys = hostKeysFor "pikachu"; hostKeys = hostKeysFor "pikachu";
}; };
}; };
clientKeyFor = host: builtins.readFile (../../hosts + "/${host}/ssh_user_ed25519_key.pub");
hostKeysFor = hostKeysFor =
host: host:
map builtins.readFile [ map builtins.readFile [