Skip to content

Commit c92ddab

Browse files
Mic92mergify[bot]
authored andcommitted
move reboot back into install phase
this is dirty but for unknown reason the previous version would make the machine fail booting.
1 parent 0f63320 commit c92ddab

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/nixos-anywhere.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,10 @@ nixosInstall() {
501501
fi
502502

503503
step Installing NixOS
504+
maybeReboot=""
505+
if [[ ${phases[reboot]-} == 1 ]]; then
506+
maybeReboot="nohup sh -c 'sleep 6 && reboot' >/dev/null &"
507+
fi
504508
ssh_ sh <<SSH
505509
set -eu ${enable_debug}
506510
# when running not in nixos we might miss this directory, but it's needed in the nixos chroot during installation
@@ -527,6 +531,7 @@ if command -v zpool >/dev/null && [ "\$(zpool list)" != "no pools available" ];
527531
umount -Rv /mnt/
528532
zpool export -a || true
529533
fi
534+
${maybeReboot}
530535
SSH
531536

532537
}

0 commit comments

Comments
 (0)