Skip to content

Commit 6bd944b

Browse files
pogobananeMic92
authored andcommitted
nixos-remote: add --skip-disko flag
1 parent 74c8547 commit 6bd944b

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/nixos-anywhere.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Options:
1515
do not reboot after installation, allowing further customization of the target installation.
1616
* --kexec url
1717
use another kexec tarball to bootstrap NixOS
18+
* --skip-disko
19+
dont format disks with disko
1820
* --stop-after-disko
1921
exit after disko formating, you can then proceed to install manually or some other way
2022
* --extra-files files
@@ -89,6 +91,9 @@ while [[ $# -gt 0 ]]; do
8991
shift
9092
shift
9193
;;
94+
--skip-disko)
95+
skip_disko=y
96+
;;
9297
--stop-after-disko)
9398
stop_after_disko=y
9499
;;
@@ -293,8 +298,12 @@ for path in "${!disk_encryption_keys[@]}"; do
293298
ssh_ "umask 077; cat > $path" <"${disk_encryption_keys[$path]}"
294299
done
295300

296-
nix_copy --to "ssh://$ssh_connection" "$disko_script"
297-
ssh_ "$disko_script"
301+
if [[ ${skip_disko} == "y" ]]; then
302+
echo "Skipping disko (partitioning)."
303+
else
304+
nix_copy --to "ssh://$ssh_connection" "$disko_script"
305+
ssh_ "$disko_script"
306+
fi
298307

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

0 commit comments

Comments
 (0)