diff --git a/docs/howtos/use-without-flakes.md b/docs/howtos/use-without-flakes.md index f54c38b6..c0097c5a 100644 --- a/docs/howtos/use-without-flakes.md +++ b/docs/howtos/use-without-flakes.md @@ -2,9 +2,10 @@ While `nixos-anywhere` is designed to work optimally with Nix Flakes, it also supports the traditional approach without flakes. This document outlines how to -use `nixos-anywhere` without relying on flakes. -You will need to [import the disko nixos module](https://github.com/nix-community/disko/blob/master/docs/HowTo.md#installing-nixos-module) in your NixOS configuration -and define disko devices as described in the [examples](https://github.com/nix-community/disko/tree/master/example). +use `nixos-anywhere` without relying on flakes. You will need to +[import the disko nixos module](https://github.com/nix-community/disko/blob/master/docs/HowTo.md#installing-nixos-module) +in your NixOS configuration and define disko devices as described in the +[examples](https://github.com/nix-community/disko/tree/master/example). ## Generate Required Store Paths diff --git a/src/nixos-anywhere.sh b/src/nixos-anywhere.sh index 761816d6..aac28964 100755 --- a/src/nixos-anywhere.sh +++ b/src/nixos-anywhere.sh @@ -476,7 +476,9 @@ if [[ ${copy_host_keys-n} == "y" ]]; then fi nixos-install --no-root-passwd --no-channel-copy --system "$nixos_system" if command -v zpool >/dev/null; then - zpool export -a || : # we always want to export the zfs pools so people can boot from it without force import + # we always want to export the zfs pools so people can boot from it without force import + umount -Rv /mnt/ + zpool export -a || true fi # We will reboot in background so we can cleanly finish the script before the hosts go down. # This makes integration into scripts easier