diff --git a/configs/nixos/hosts/neogaia/ssh_user_ed25519_key.pub b/configs/nixos/hosts/neogaia/ssh_user_ed25519_key.pub new file mode 100644 index 0000000..93c84ad --- /dev/null +++ b/configs/nixos/hosts/neogaia/ssh_user_ed25519_key.pub @@ -0,0 +1 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGxQ4kWsBo2OGYIPOkFe0vNEcB3yoJwAu0y9wrdQzALE alexion@neogaia diff --git a/configs/nixos/hosts/pikachu/ssh_user_ed25519_key.pub b/configs/nixos/hosts/pikachu/ssh_user_ed25519_key.pub new file mode 100644 index 0000000..dcbcbb3 --- /dev/null +++ b/configs/nixos/hosts/pikachu/ssh_user_ed25519_key.pub @@ -0,0 +1 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINNqJIC6VRXyvrNf3n9su9KdPCikC3CjK/QrCK2reHdB alexion@pikachu diff --git a/configs/nixos/hosts/zeus/ssh_user_ed25519_key.pub b/configs/nixos/hosts/zeus/ssh_user_ed25519_key.pub new file mode 100644 index 0000000..16b5499 --- /dev/null +++ b/configs/nixos/hosts/zeus/ssh_user_ed25519_key.pub @@ -0,0 +1 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIRBcHHuubptXCdvED/p2dR3MpjGN/AimqLasLY5984G alexion@zeus diff --git a/configs/nixos/modules/network/ssh.nix b/configs/nixos/modules/network/ssh.nix index 69c68b3..21de18e 100644 --- a/configs/nixos/modules/network/ssh.nix +++ b/configs/nixos/modules/network/ssh.nix @@ -37,22 +37,23 @@ let neogaia = { hostName = registry.address.neogaia.self; - clientKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGxQ4kWsBo2OGYIPOkFe0vNEcB3yoJwAu0y9wrdQzALE alexion@neogaia"; + clientKey = clientKeyFor "neogaia"; hostKeys = hostKeysFor "neogaia"; }; zeus = { hostName = registry.address.zeus.self; - clientKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIRBcHHuubptXCdvED/p2dR3MpjGN/AimqLasLY5984G alexion@zeus"; + clientKey = clientKeyFor "zeus"; hostKeys = hostKeysFor "zeus"; }; pikachu = { hostName = registry.address.pikachu.self; - clientKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINNqJIC6VRXyvrNf3n9su9KdPCikC3CjK/QrCK2reHdB alexion@pikachu"; + clientKey = clientKeyFor "pikachu"; hostKeys = hostKeysFor "pikachu"; }; }; + clientKeyFor = host: builtins.readFile (../../hosts + "/${host}/ssh_user_ed25519_key.pub"); hostKeysFor = host: map builtins.readFile [