From 3b977f181d281b67a05fbc668edba525ad1c883c Mon Sep 17 00:00:00 2001 From: Bernardo Magri Date: Fri, 1 May 2026 16:43:05 +0100 Subject: [PATCH] fix(installer): resolve disko evaluation crash and infinite loops - Fix disko-config.nix signature by adding '...' to handle unexpected CLI arguments. - Update disko mode to 'destroy,format,mount' for the modern API and to avoid deprecation warnings. - Fix infinite loops in 'configure_impermanence' and 'confirm_form_factor' caused by misinterpreting 'No' (rc=1) as an abort. --- installer/disko-config.nix | 1 + installer/install.sh | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/installer/disko-config.nix b/installer/disko-config.nix index 7388018..eb183a0 100644 --- a/installer/disko-config.nix +++ b/installer/disko-config.nix @@ -19,6 +19,7 @@ # function arguments are the right shape. { mainDrive , extraDrives ? [] +, ... }: let diff --git a/installer/install.sh b/installer/install.sh index bd54f0a..449472a 100755 --- a/installer/install.sh +++ b/installer/install.sh @@ -841,7 +841,7 @@ confirm_form_factor() { if [[ $rc -eq 0 ]]; then FORM_FACTOR="$default" else - if [[ $rc -eq 130 || $rc -eq 1 ]]; then return 130; fi + if [[ $rc -eq 130 ]]; then return 130; fi FORM_FACTOR=$([[ "$default" == "laptop" ]] && echo desktop || echo laptop) fi success "Form factor: $FORM_FACTOR" @@ -875,7 +875,8 @@ configure_impermanence() { ENABLE_IMPERMANENCE="true" success "Impermanence enabled" else - if [[ $rc -eq 130 || $rc -eq 1 ]]; then return 130; fi + if [[ $rc -eq 130 ]]; then return 130; fi + ENABLE_IMPERMANENCE="false" info "Impermanence disabled (traditional persistent root)" fi save_state @@ -1093,7 +1094,7 @@ run_disko_with_retry() { while true; do local rc=0 set +e - disko --mode disko \ + disko --mode destroy,format,mount \ --argstr mainDrive "$main_drive" \ --arg extraDrives "$extras_nix" \ "$disko_file" 2>&1 | tee "$log"