From fa6e2f9e21c95a2f6a5506244c57f4fd5530e8c3 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sun, 6 Apr 2025 14:10:07 +0300 Subject: [PATCH] hosts/eldrid/nix.nix: fix ssh key hosts/sarien/nix.nix: fix ssh key Signed-off-by: unexplrd --- hosts/eldrid/nix.nix | 6 +++++- hosts/sarien/nix.nix | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) 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"; }