From adb02fbcc291f484c202cd56d659b6eb69af9018 Mon Sep 17 00:00:00 2001 From: Martin Berg Alstad Date: Tue, 20 May 2025 21:37:26 +0200 Subject: [PATCH] :sparkles: [shared] Added homelab systemConfig --- flake.nix | 6 ++++++ shared/modules/security/ssh.nix | 10 ++-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/flake.nix b/flake.nix index 669494a..70cfc9e 100644 --- a/flake.nix +++ b/flake.nix @@ -87,6 +87,12 @@ wayland.enable = false; ssh.publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJE9m7YiITe1sDqSZ7Pa8luIw3WToLsypixZEqE4wCQE"; } + { + hostName = "homelab"; + system = "x86_64-linux"; + wayland.enable = false; + ssh.publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIARDv5nRlfPDXdV+Db4FaqeSJZ3/3MO0frYGzuVeqYAl"; + } # TODO Homelab config ]; diff --git a/shared/modules/security/ssh.nix b/shared/modules/security/ssh.nix index f38bf7a..a025acb 100644 --- a/shared/modules/security/ssh.nix +++ b/shared/modules/security/ssh.nix @@ -8,12 +8,6 @@ with builtins; let domain = "dns.${common.domain}"; - allSystems = systems ++ [ - { - hostName = "homelab"; - ssh.publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIARDv5nRlfPDXdV+Db4FaqeSJZ3/3MO0frYGzuVeqYAl"; - } - ]; in { programs.ssh.knownHosts = listToAttrs ( @@ -23,9 +17,9 @@ in extraHostNames = [ "${system.hostName}.${domain}" ]; publicKey = system.ssh.publicKey; }; - }) allSystems + }) systems ); users.users.${systemConfig.username}.openssh.authorizedKeys.keys = ( - map (system: system.ssh.publicKey) allSystems + map (system: system.ssh.publicKey) systems ); }