···256chroot $mountPoint /nix/var/nix/profiles/system/activate
257258259-# Some systems may not be prepared to use NixOS' paths.
260-export PATH=/run/current-system/sw/bin:/run/current-system/sw/sbin:$PATH
261-export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos:nixpkgs=/etc/nixos/nixpkgs
262-export NIX_PATH=$NIX_PATH:nixos-config=/etc/nixos/configuration.nix:/nix/var/nix/profiles/per-user/root/channels
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
269fi
···256chroot $mountPoint /nix/var/nix/profiles/system/activate
257258000000259# Ask the user to set a root password.
260+if [ "$(chroot $mountPoint /run/current-system/sw/bin/sh -l -c "nix-instantiate --eval '<nixpkgs/nixos>' -A config.users.mutableUsers")" = true ] && [ -t 0 ] ; then
261 echo "setting root password..."
262 chroot $mountPoint /var/setuid-wrappers/passwd
263fi