diff options
-rw-r--r-- | nixos/modules/system/boot/initrd-ssh.nix | 2 | ||||
-rw-r--r-- | nixos/modules/system/boot/stage-1-init.sh | 5 |
2 files changed, 2 insertions, 5 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 diff --git a/nixos/modules/system/boot/stage-1-init.sh b/nixos/modules/system/boot/stage-1-init.sh index c3d402eca042..95df0ace1ca4 100644 --- a/nixos/modules/system/boot/stage-1-init.sh +++ b/nixos/modules/system/boot/stage-1-init.sh @@ -72,11 +72,6 @@ mkdir -p /run mount -t tmpfs -o "mode=0755,size=@runSize@" tmpfs /run -# Initialise /etc. -echo 'root:x:0:0:root:/root:${cfg.shell}' > /etc/passwd -echo 'passwd: files' > /etc/nsswitch.conf - - # Process the kernel command line. export stage2Init=/init for o in $(cat /proc/cmdline); do |