summary refs log tree commit diff
path: root/nixos/modules/system/boot/initrd-ssh.nix
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2016-02-03 14:43:36 +0300
committerNikolay Amiantov <ab@fmap.me>2016-02-03 14:56:55 +0300
commit1d70e2fb7533ffa87120323257f9c6ea0c4c8c9c (patch)
tree0fd07157ff46d3985fd69c3ef989b0bbb38c4cfb /nixos/modules/system/boot/initrd-ssh.nix
parent815ff00ee0bf2ccbacaafbb601937686edb2c0a7 (diff)
downloadnixlib-1d70e2fb7533ffa87120323257f9c6ea0c4c8c9c.tar
nixlib-1d70e2fb7533ffa87120323257f9c6ea0c4c8c9c.tar.gz
nixlib-1d70e2fb7533ffa87120323257f9c6ea0c4c8c9c.tar.bz2
nixlib-1d70e2fb7533ffa87120323257f9c6ea0c4c8c9c.tar.lz
nixlib-1d70e2fb7533ffa87120323257f9c6ea0c4c8c9c.tar.xz
nixlib-1d70e2fb7533ffa87120323257f9c6ea0c4c8c9c.tar.zst
nixlib-1d70e2fb7533ffa87120323257f9c6ea0c4c8c9c.zip
initrd modules: move passwd and nsswitch back to initrd-ssh
Partially reverts commit 901163c0c707d36323400394bf6e75adc4621e2f.
This has broken remote SSH into initrd because ${cfg.shell} is not
expanded. Also, nsswitch is useless without libnss_files.so which
are installed by initrd-ssh.
Diffstat (limited to 'nixos/modules/system/boot/initrd-ssh.nix')
-rw-r--r--nixos/modules/system/boot/initrd-ssh.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/nixos/modules/system/boot/initrd-ssh.nix b/nixos/modules/system/boot/initrd-ssh.nix
index 6809aefb7112..506e42bc024d 100644
--- a/nixos/modules/system/boot/initrd-ssh.nix
+++ b/nixos/modules/system/boot/initrd-ssh.nix
@@ -101,6 +101,8 @@ in
         mount -t devpts devpts /dev/pts
 
         echo '${cfg.shell}' > /etc/shells
+        echo 'root:x:0:0:root:/root:${cfg.shell}' > /etc/passwd
+        echo 'passwd: files' > /etc/nsswitch.conf
 
         mkdir -p /var/log
         touch /var/log/lastlog