diff --git a/hosts/eldrid/nix.nix b/hosts/eldrid/nix.nix index 31cb5d3..c466938 100644 --- a/hosts/eldrid/nix.nix +++ b/hosts/eldrid/nix.nix @@ -5,6 +5,10 @@ # pkgs, ... }: let + hostName = + if (config.networking.hostName == "vylxae") + then "sarien" + else config.networking.hostName; inherit (config.sops) secrets; inherit (inputs) mysecrets; in { @@ -25,7 +29,7 @@ in { hostName = "dunamis"; sshUser = "nix-ssh"; system = "x86_64-linux"; - sshKey = secrets."ssh-eldrid-user".path; + sshKey = secrets."ssh-${hostName}-user".path; supportedFeatures = ["nixos-test" "big-parallel" "kvm" "benchmark"]; publicHostKey = builtins.readFile "${mysecrets}/ssh/ssh_host_ed25519_dunamis.base64"; } diff --git a/hosts/sarien/nix.nix b/hosts/sarien/nix.nix index 31cb5d3..c466938 100644 --- a/hosts/sarien/nix.nix +++ b/hosts/sarien/nix.nix @@ -5,6 +5,10 @@ # pkgs, ... }: let + hostName = + if (config.networking.hostName == "vylxae") + then "sarien" + else config.networking.hostName; inherit (config.sops) secrets; inherit (inputs) mysecrets; in { @@ -25,7 +29,7 @@ in { hostName = "dunamis"; sshUser = "nix-ssh"; system = "x86_64-linux"; - sshKey = secrets."ssh-eldrid-user".path; + sshKey = secrets."ssh-${hostName}-user".path; supportedFeatures = ["nixos-test" "big-parallel" "kvm" "benchmark"]; publicHostKey = builtins.readFile "${mysecrets}/ssh/ssh_host_ed25519_dunamis.base64"; }