forked from mirrors/nixpkgs
initrd-ssh service: add assertions for host keys
This commit is contained in:
parent
ba718a9179
commit
53b8852498
|
@ -85,6 +85,10 @@ in
|
|||
};
|
||||
|
||||
config = mkIf (config.boot.initrd.network.enable && cfg.enable) {
|
||||
assertions = [ {
|
||||
assertion = cfg.hostRSAKey != null || cfg.hostDSSKey != null || cfg.hostECDSAKey != null;
|
||||
message = "You should specify at least one host key for initrd SSH";
|
||||
} ];
|
||||
|
||||
boot.initrd.extraUtilsCommands = ''
|
||||
copy_bin_and_libs ${pkgs.dropbear}/bin/dropbear
|
||||
|
|
Loading…
Reference in a new issue