mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 17:33:09 +00:00
Merge pull request #197382 from phaer/patch-4
initrd-ssh: allow empty hostKeys
This commit is contained in:
commit
e1185ea096
@ -73,6 +73,15 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
ignoreEmptyHostKeys = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = lib.mdDoc ''
|
||||
Allow leaving {option}`config.boot.initrd.network.ssh` empty,
|
||||
to deploy ssh host keys out of band.
|
||||
'';
|
||||
};
|
||||
|
||||
authorizedKeys = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = config.users.users.root.openssh.authorizedKeys.keys;
|
||||
@ -141,7 +150,7 @@ in
|
||||
}
|
||||
|
||||
{
|
||||
assertion = cfg.hostKeys != [];
|
||||
assertion = (cfg.hostKeys != []) || cfg.ignoreEmptyHostKeys;
|
||||
message = ''
|
||||
You must now pre-generate the host keys for initrd SSH.
|
||||
See the boot.initrd.network.ssh.hostKeys documentation
|
||||
|
Loading…
Reference in New Issue
Block a user