diff --git a/lib/apps/nixos-install.sh b/lib/apps/nixos-install.sh index 05e1116e..bdbadf07 100644 --- a/lib/apps/nixos-install.sh +++ b/lib/apps/nixos-install.sh @@ -141,7 +141,9 @@ install() { ### Pull the trigger -if _read_boolean "Do you want to DELETE ALL PARTITIONS?" N; then +DO_PARTITION="$(_read_boolean "Do you want to DELETE ALL PARTITIONS?" N)" +readonly DO_PARTITION +if "${DO_PARTITION}"; then partition create_volumes create_filesystems @@ -155,7 +157,9 @@ if [[ ${LVM_PV_NUM_ACTIVE} -lt 1 ]]; then decrypt_lvm fi -if _read_boolean "Do you want to INSTALL NixOS now?" N; then +DO_INSTALL="$(_read_boolean "Do you want to INSTALL NixOS now?" N)" +readonly DO_INSTALL +if "${DO_INSTALL}"; then install fi