3
0
Fork 0
forked from mirrors/nixpkgs

initrd-ssh service: add assertions for host keys

This commit is contained in:
Nikolay Amiantov 2016-05-20 16:34:16 +03:00
parent ba718a9179
commit 53b8852498

View file

@ -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