Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos-remote: add --skip-disko flag #69

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 11 additions & 1 deletion src/nixos-anywhere.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -89,6 +91,9 @@ while [[ $# -gt 0 ]]; do
shift
shift
;;
--skip-reformat)
skip_reformat=y
;;
--stop-after-disko)
stop_after_disko=y
;;
Expand Down Expand Up @@ -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`?
Expand Down