diff --git a/README.md b/README.md index 98eb9360..40e20b0f 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,8 @@ Options: do not reboot after installation, allowing further customization of the target installation. * --kexec url use another kexec tarball to bootstrap NixOS +* --skip-reformat + dont format disks with disko (only mount) * --stop-after-disko exit after disko formating, you can then proceed to install manually or some other way * --extra-files files diff --git a/src/nixos-anywhere.sh b/src/nixos-anywhere.sh index a3a7f967..48a129b4 100755 --- a/src/nixos-anywhere.sh +++ b/src/nixos-anywhere.sh @@ -15,6 +15,8 @@ Options: do not reboot after installation, allowing further customization of the target installation. * --kexec url use another kexec tarball to bootstrap NixOS +* --skip-reformat + dont format disks with disko (only mount) * --stop-after-disko exit after disko formating, you can then proceed to install manually or some other way * --extra-files files @@ -89,6 +91,9 @@ while [[ $# -gt 0 ]]; do shift shift ;; + --skip-reformat) + skip_reformat=y + ;; --stop-after-disko) stop_after_disko=y ;; @@ -294,7 +299,12 @@ for path in "${!disk_encryption_keys[@]}"; do done nix_copy --to "ssh://$ssh_connection" "$disko_script" -ssh_ "$disko_script" +if [[ ${skip_reformat} == "y" ]]; then + echo "Skipping disko partitioning (only do mount)." + ssh_ "$disko_script -m mount" +else + ssh_ "$disko_script" +fi if [[ ${stop_after_disko-n} == "y" ]]; then # Should we also do this for `--no-reboot`?