Skip to content

Commit be2d9d7

Browse files
authored
Don't run preSwitchChecks during install
NixOS includes an option called `system.preSwitchChecks` since NixOS/nixpkgs@6e192c4. As we are installing a new system here, we do not care too much about the systems state pre-switching and therefore disable those checks. This change is motivated by nix-community/srvos#591 (comment)
1 parent 97b45ac commit be2d9d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/nixos-anywhere.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ if [ ${copyHostKeys-n} = "y" ]; then
614614
cp -a "\$p" "/mnt/\$p"
615615
done
616616
fi
617-
nixos-install --no-root-passwd --no-channel-copy --system "$nixosSystem"
617+
NIXOS_NO_CHECK=1 nixos-install --no-root-passwd --no-channel-copy --system "$nixosSystem"
618618
if [[ ${phases[reboot]} == 1 ]]; then
619619
if command -v zpool >/dev/null && [ "\$(zpool list)" != "no pools available" ]; then
620620
# we always want to export the zfs pools so people can boot from it without force import

0 commit comments

Comments
 (0)