Skip to content

Commit ab5d00f

Browse files
phaerEnzime
andcommitted
Allow skipping system.preSwitchChecks
As they might be written for switching from one generation to another, without initial installation in mind and failing checks would prevent successful installation. Note that the first line is just string substition, as SSH doesn't pass through arbitrary env variables as that would have far-reaching security implications. Co-Authored-By: Michael Hoang <[email protected]>
1 parent 77e6a4e commit ab5d00f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/nixos-anywhere.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,10 @@ if [ ${copyHostKeys-n} = "y" ]; then
719719
cp -a "\$p" "/mnt/\$p"
720720
done
721721
fi
722+
# https://stackoverflow.com/a/13864829
723+
if [ ! -z ${NIXOS_NO_CHECK+0} ]; then
724+
export NIXOS_NO_CHECK
725+
fi
722726
nixos-install --no-root-passwd --no-channel-copy --system "$nixosSystem"
723727
if [[ ${phases[reboot]} == 1 ]]; then
724728
if command -v zpool >/dev/null && [ "\$(zpool list)" != "no pools available" ]; then

0 commit comments

Comments
 (0)