···256256chroot $mountPoint /nix/var/nix/profiles/system/activate
257257258258259259-# Some systems may not be prepared to use NixOS' paths.
260260-export PATH=/run/current-system/sw/bin:/run/current-system/sw/sbin:$PATH
261261-export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos:nixpkgs=/etc/nixos/nixpkgs
262262-export NIX_PATH=$NIX_PATH:nixos-config=/etc/nixos/configuration.nix:/nix/var/nix/profiles/per-user/root/channels
263263-264264-265259# Ask the user to set a root password.
266266-if [ "$(chroot $mountPoint nix-instantiate --eval '<nixpkgs/nixos>' -A config.users.mutableUsers)" = true ] && [ -t 0 ] ; then
260260+if [ "$(chroot $mountPoint /run/current-system/sw/bin/sh -l -c "nix-instantiate --eval '<nixpkgs/nixos>' -A config.users.mutableUsers")" = true ] && [ -t 0 ] ; then
267261 echo "setting root password..."
268262 chroot $mountPoint /var/setuid-wrappers/passwd
269263fi