diff --git a/nixos/modules/installer/tools/nixos-install.sh b/nixos/modules/installer/tools/nixos-install.sh index 097631eda9c9..b1f4772d5705 100644 --- a/nixos/modules/installer/tools/nixos-install.sh +++ b/nixos/modules/installer/tools/nixos-install.sh @@ -263,7 +263,7 @@ export NIX_PATH=$NIX_PATH:nixos-config=/etc/nixos/configuration.nix:/nix/var/nix # Ask the user to set a root password. -if [ "$(chroot $mountPoint nix-instantiate --eval '' -A config.users.mutableUsers)" = true ] && [ -t 1 ] ; then +if [ "$(chroot $mountPoint nix-instantiate --eval '' -A config.users.mutableUsers)" = true ] && [ -t 0 ] ; then echo "setting root password..." chroot $mountPoint /var/setuid-wrappers/passwd fi