diff options
author | obadz <obadz-git@obadz.com> | 2016-08-23 18:50:06 +0100 |
---|---|---|
committer | obadz <obadz-git@obadz.com> | 2016-08-23 18:50:06 +0100 |
commit | 0e8d2725dcc1aef5c56e63c939249b27190f6367 (patch) | |
tree | 654e83b5f539b31947ee5011a0d1df797bf4c75d /nixos/modules/system | |
parent | 13c04c837db0f69705cfa4478c513b2230243ca2 (diff) | |
parent | 415e1983ca650777d476d39de1db61a9e9877621 (diff) | |
download | nixlib-0e8d2725dcc1aef5c56e63c939249b27190f6367.tar nixlib-0e8d2725dcc1aef5c56e63c939249b27190f6367.tar.gz nixlib-0e8d2725dcc1aef5c56e63c939249b27190f6367.tar.bz2 nixlib-0e8d2725dcc1aef5c56e63c939249b27190f6367.tar.lz nixlib-0e8d2725dcc1aef5c56e63c939249b27190f6367.tar.xz nixlib-0e8d2725dcc1aef5c56e63c939249b27190f6367.tar.zst nixlib-0e8d2725dcc1aef5c56e63c939249b27190f6367.zip |
Merge branch 'master' into staging
Diffstat (limited to 'nixos/modules/system')
-rw-r--r-- | nixos/modules/system/boot/initrd-ssh.nix | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/nixos/modules/system/boot/initrd-ssh.nix b/nixos/modules/system/boot/initrd-ssh.nix index d0a4ce51148f..bc899984c57d 100644 --- a/nixos/modules/system/boot/initrd-ssh.nix +++ b/nixos/modules/system/boot/initrd-ssh.nix @@ -93,6 +93,10 @@ in boot.initrd.extraUtilsCommands = '' copy_bin_and_libs ${pkgs.dropbear}/bin/dropbear cp -pv ${pkgs.glibc.out}/lib/libnss_files.so.* $out/lib + + ${optionalString (cfg.hostRSAKey != null) "install -D ${cfg.hostRSAKey} $out/etc/dropbear/dropbear_rsa_host_key"} + ${optionalString (cfg.hostDSSKey != null) "install -D ${cfg.hostDSSKey} $out/etc/dropbear/dropbear_dss_host_key"} + ${optionalString (cfg.hostECDSAKey != null) "install -D ${cfg.hostECDSAKey} $out/etc/dropbear/dropbear_ecdsa_host_key"} ''; boot.initrd.extraUtilsCommandsTest = '' @@ -108,9 +112,9 @@ in touch /var/log/lastlog mkdir -p /etc/dropbear - ${optionalString (cfg.hostRSAKey != null) "ln -s ${cfg.hostRSAKey} /etc/dropbear/dropbear_rsa_host_key"} - ${optionalString (cfg.hostDSSKey != null) "ln -s ${cfg.hostDSSKey} /etc/dropbear/dropbear_dss_host_key"} - ${optionalString (cfg.hostECDSAKey != null) "ln -s ${cfg.hostECDSAKey} /etc/dropbear/dropbear_ecdsa_host_key"} + ${optionalString (cfg.hostRSAKey != null) "ln -s $extraUtils/etc/dropbear/dropbear_rsa_host_key /etc/dropbear/dropbear_rsa_host_key"} + ${optionalString (cfg.hostDSSKey != null) "ln -s $extraUtils/etc/dropbear/dropbear_dss_host_key /etc/dropbear/dropbear_dss_host_key"} + ${optionalString (cfg.hostECDSAKey != null) "ln -s $extraUtils/etc/dropbear/dropbear_ecdsa_host_key /etc/dropbear/dropbear_ecdsa_host_key"} mkdir -p /root/.ssh ${concatStrings (map (key: '' |