@@ -93,6 +93,10 @@ in
9393 boot.initrd.extraUtilsCommands = ''
9494 copy_bin_and_libs ${pkgs.dropbear}/bin/dropbear
9595 cp -pv ${pkgs.glibc.out}/lib/libnss_files.so.* $out/lib
96+
97+ ${optionalString (cfg.hostRSAKey != null) "install -D ${cfg.hostRSAKey} $out/etc/dropbear/dropbear_rsa_host_key"}
98+ ${optionalString (cfg.hostDSSKey != null) "install -D ${cfg.hostDSSKey} $out/etc/dropbear/dropbear_dss_host_key"}
99+ ${optionalString (cfg.hostECDSAKey != null) "install -D ${cfg.hostECDSAKey} $out/etc/dropbear/dropbear_ecdsa_host_key"}
96100 '';
97101
98102 boot.initrd.extraUtilsCommandsTest = ''
@@ -108,9 +112,9 @@ in
108112 touch /var/log/lastlog
109113
110114 mkdir -p /etc/dropbear
111− ${optionalString (cfg.hostRSAKey != null) "ln -s ${cfg.hostRSAKey} /etc/dropbear/dropbear_rsa_host_key"}
112− ${optionalString (cfg.hostDSSKey != null) "ln -s ${cfg.hostDSSKey} /etc/dropbear/dropbear_dss_host_key"}
113− ${optionalString (cfg.hostECDSAKey != null) "ln -s ${cfg.hostECDSAKey} /etc/dropbear/dropbear_ecdsa_host_key"}
115+ ${optionalString (cfg.hostRSAKey != null) "ln -s $extraUtils/etc/dropbear/dropbear_rsa_host_key /etc/dropbear/dropbear_rsa_host_key"}
116+ ${optionalString (cfg.hostDSSKey != null) "ln -s $extraUtils/etc/dropbear/dropbear_dss_host_key /etc/dropbear/dropbear_dss_host_key"}
117+ ${optionalString (cfg.hostECDSAKey != null) "ln -s $extraUtils/etc/dropbear/dropbear_ecdsa_host_key /etc/dropbear/dropbear_ecdsa_host_key"}
114118
115119 mkdir -p /root/.ssh
116120 ${concatStrings (map (key: ''