19.09: fixed ssh key problem with init-ssh

This commit is contained in:
Ingolf Wagner 2019-10-28 17:48:48 +01:00
parent 3b5156a88a
commit ea1c05b693
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
3 changed files with 5 additions and 2 deletions

View file

@ -21,7 +21,6 @@
configuration.init-ssh = { configuration.init-ssh = {
enable = "enabled"; enable = "enabled";
kernelModules = [ "e1000e" ]; kernelModules = [ "e1000e" ];
authorizedKeys = config.users.users.root.openssh.authorizedKeys.keyFiles;
hostECDSAKey = <secrets/init-ssh/host_ecdsa_key>; hostECDSAKey = <secrets/init-ssh/host_ecdsa_key>;
}; };

View file

@ -35,7 +35,6 @@
configuration.init-ssh = { configuration.init-ssh = {
enable = "enabled"; enable = "enabled";
kernelModules = [ "r8169" ]; kernelModules = [ "r8169" ];
authorizedKeys = config.users.users.root.openssh.authorizedKeys.keyFiles;
hostECDSAKey = <secrets/init-ssh/host_ecdsa_key>; hostECDSAKey = <secrets/init-ssh/host_ecdsa_key>;
}; };

View file

@ -26,6 +26,11 @@ in {
authorizedKeys = mkOption { authorizedKeys = mkOption {
type = with types; listOf str; 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 { hostDSSKey = mkOption {