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:
parent
533dfa09df
commit
1876fb8f1d
1 changed files with 4 additions and 0 deletions
|
@ -45,7 +45,11 @@ in rec {
|
||||||
[[ -e "''${NIXOS_CONFIG}" ]]
|
[[ -e "''${NIXOS_CONFIG}" ]]
|
||||||
[[ -e "${mntRootVol}/nixos" ]]
|
[[ -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
|
nixos-install --max-jobs 5 --cores 4 --no-root-passwd --root ${mntRootVol}/nixos
|
||||||
|
EOF
|
||||||
'';
|
'';
|
||||||
|
|
||||||
diskPrepare = pkgs.writeScript "script" ''
|
diskPrepare = pkgs.writeScript "script" ''
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue