From ea1c05b69363f36d8bac62cb70f664a9a3ec8f43 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Mon, 28 Oct 2019 17:48:48 +0100 Subject: [PATCH] 19.09: fixed ssh key problem with init-ssh --- configs/porani/configuration.nix | 1 - configs/workhorse/configuration.nix | 1 - system/server/initssh.nix | 5 +++++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/configs/porani/configuration.nix b/configs/porani/configuration.nix index cbf4cc7..0c8566d 100644 --- a/configs/porani/configuration.nix +++ b/configs/porani/configuration.nix @@ -21,7 +21,6 @@ configuration.init-ssh = { enable = "enabled"; kernelModules = [ "e1000e" ]; - authorizedKeys = config.users.users.root.openssh.authorizedKeys.keyFiles; hostECDSAKey = ; }; diff --git a/configs/workhorse/configuration.nix b/configs/workhorse/configuration.nix index 7c92f75..b89b0c9 100644 --- a/configs/workhorse/configuration.nix +++ b/configs/workhorse/configuration.nix @@ -35,7 +35,6 @@ configuration.init-ssh = { enable = "enabled"; kernelModules = [ "r8169" ]; - authorizedKeys = config.users.users.root.openssh.authorizedKeys.keyFiles; hostECDSAKey = ; }; diff --git a/system/server/initssh.nix b/system/server/initssh.nix index e83d7c3..94a6d8d 100644 --- a/system/server/initssh.nix +++ b/system/server/initssh.nix @@ -26,6 +26,11 @@ in { authorizedKeys = mkOption { type = with types; listOf str; + default = config.users.users.root.openssh.authorizedKeys.keys ++ ( + map + (keyFile: lib.fileContents keyFile) + config.users.users.root.openssh.authorizedKeys.keyFiles + ); }; hostDSSKey = mkOption {