nixos-install: correctly detect stdin

+1 -1
+1 -1
nixos/modules/installer/tools/nixos-install.sh
··· 263 264 265 # Ask the user to set a root password. 266 - if [ "$(chroot $mountPoint nix-instantiate --eval '<nixpkgs/nixos>' -A config.users.mutableUsers)" = true ] && [ -t 1 ] ; then 267 echo "setting root password..." 268 chroot $mountPoint /var/setuid-wrappers/passwd 269 fi
··· 263 264 265 # Ask the user to set a root password. 266 + if [ "$(chroot $mountPoint nix-instantiate --eval '<nixpkgs/nixos>' -A config.users.mutableUsers)" = true ] && [ -t 0 ] ; then 267 echo "setting root password..." 268 chroot $mountPoint /var/setuid-wrappers/passwd 269 fi