nix/os/devices/disk: unset $system before nixos-install

This fixes the nixos-install error

> error: selector 'x86_64-linux' matches no derivations

which is due to $system being set and used by nixos-install.
This commit is contained in:
steveej 2019-01-12 22:30:27 +01:00
parent 533dfa09df
commit 1876fb8f1d

View file

@ -45,7 +45,11 @@ in rec {
[[ -e "''${NIXOS_CONFIG}" ]]
[[ -e "${mntRootVol}/nixos" ]]
sudo -E $SHELL <<EOF
# 'having $system set breaks nixos-install'
unset system
nixos-install --max-jobs 5 --cores 4 --no-root-passwd --root ${mntRootVol}/nixos
EOF
'';
diskPrepare = pkgs.writeScript "script" ''