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 1 commit
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-disko
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* --skip-disko
* --skip-partitioning

dont format disks with disko
* --stop-after-disko
exit after disko formating, you can then proceed to install manually or some other way
* --extra-files files
Expand Down
13 changes: 11 additions & 2 deletions 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-disko
dont format disks with disko
* --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-disko)
skip_disko=y
;;
--stop-after-disko)
stop_after_disko=y
;;
Expand Down Expand Up @@ -293,8 +298,12 @@ for path in "${!disk_encryption_keys[@]}"; do
ssh_ "umask 077; cat > $path" <"${disk_encryption_keys[$path]}"
done

nix_copy --to "ssh://$ssh_connection" "$disko_script"
ssh_ "$disko_script"
if [[ ${skip_disko} == "y" ]]; then
echo "Skipping disko (partitioning)."
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should actually mount instead of partitioning.

else
nix_copy --to "ssh://$ssh_connection" "$disko_script"
ssh_ "$disko_script"
fi

if [[ ${stop_after_disko-n} == "y" ]]; then
# Should we also do this for `--no-reboot`?
Expand Down