summary refs log tree commit diff
path: root/nixos/modules/installer
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-08-05 13:18:31 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-08-05 14:33:18 +0200
commit699ba71b50e9fcdfffcfdb17abee7abba778cc2d (patch)
tree0d5205f4138b74270e5c626d6691ac02908dd5d2 /nixos/modules/installer
parent3f1354a3cd61d37d9b5c91706945f849c9af71c4 (diff)
downloadnixpkgs-699ba71b50e9fcdfffcfdb17abee7abba778cc2d.tar
nixpkgs-699ba71b50e9fcdfffcfdb17abee7abba778cc2d.tar.gz
nixpkgs-699ba71b50e9fcdfffcfdb17abee7abba778cc2d.tar.bz2
nixpkgs-699ba71b50e9fcdfffcfdb17abee7abba778cc2d.tar.lz
nixpkgs-699ba71b50e9fcdfffcfdb17abee7abba778cc2d.tar.xz
nixpkgs-699ba71b50e9fcdfffcfdb17abee7abba778cc2d.tar.zst
nixpkgs-699ba71b50e9fcdfffcfdb17abee7abba778cc2d.zip
nixos-install: Source the profile when running inside the chroot
Diffstat (limited to 'nixos/modules/installer')
-rw-r--r--nixos/modules/installer/tools/nixos-install.sh8
1 files changed, 1 insertions, 7 deletions
diff --git a/nixos/modules/installer/tools/nixos-install.sh b/nixos/modules/installer/tools/nixos-install.sh
index b1f4772d570..f7fe6245d6d 100644
--- a/nixos/modules/installer/tools/nixos-install.sh
+++ b/nixos/modules/installer/tools/nixos-install.sh
@@ -256,14 +256,8 @@ NIXOS_INSTALL_GRUB=1 chroot $mountPoint \
 chroot $mountPoint /nix/var/nix/profiles/system/activate
 
 
-# Some systems may not be prepared to use NixOS' paths.
-export PATH=/run/current-system/sw/bin:/run/current-system/sw/sbin:$PATH
-export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos:nixpkgs=/etc/nixos/nixpkgs
-export NIX_PATH=$NIX_PATH:nixos-config=/etc/nixos/configuration.nix:/nix/var/nix/profiles/per-user/root/channels
-
-
 # Ask the user to set a root password.
-if [ "$(chroot $mountPoint nix-instantiate --eval '<nixpkgs/nixos>' -A config.users.mutableUsers)" = true ] && [ -t 0 ] ; then
+if [ "$(chroot $mountPoint /run/current-system/sw/bin/sh -l -c "nix-instantiate --eval '<nixpkgs/nixos>' -A config.users.mutableUsers")" = true ] && [ -t 0 ] ; then
     echo "setting root password..."
     chroot $mountPoint /var/setuid-wrappers/passwd
 fi