From e2fa6093c82766032cef983287224133905754b2 Mon Sep 17 00:00:00 2001 From: Raphael Numbus Date: Sat, 6 Dec 2025 22:36:56 +0100 Subject: [PATCH] TEST --- deploy.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/deploy.sh b/deploy.sh index 6b93669..87775eb 100755 --- a/deploy.sh +++ b/deploy.sh @@ -453,7 +453,7 @@ EOF gum confirm "Proceed with this disk configuration?" || { echo " ❌ Aborting as requested."; exit 1; } # Final recap <-- - echo -e "\n\n ⚙️ Generating disko configuration from templates..." + echo -e "\n\n ✅ Generating disko configuration from templates..." template_file="config-files/disks/boot-${NUMBER_OF_BOOT_DISKS}.nix" (envsubst < "$template_file") > ./nix-config/disks/disko.nix echo -e "\n ✅ Generated boot disk configuration." @@ -474,13 +474,17 @@ EOF done [[ "$NUMBER_OF_PARITY_DISKS" -gt 0 ]] && echo -e "\n ✅ Generated $NUMBER_OF_PARITY_DISKS parity disk configuration(s)." - # Close the disko imports block - echo '}' >> ./nix-config/disks/disko.nix - echo -e "\n ✅ Final disko configuration created at './nix-config/disks/disko.nix'." + cat <<'EOF' >> ./nix-config/disks/disko.nix + }; + }; +} +EOF + + echo -e "\n ✅ Final disko configuration created. # --> Generate automatic unlock configuration in ./nix-config/disks/snapraid.nix if [[ "$NUMBER_OF_CONTENT_DISKS" -gt 0 || "$NUMBER_OF_PARITY_DISKS" -gt 0 ]]; then - echo -e "\n ⚙️ Adding automatic disk unlocking configuration to './nix-config/disks/snapraid.nix'..." + echo -e "\n\n ✅ Adding automatic disk unlocking configuration to './nix-config/disks/snapraid.nix'..." sed -i '$ d' ./nix-config/disks/snapraid.nix cat <> ./nix-config/disks/snapraid.nix @@ -512,8 +516,6 @@ EOF }; } EOF - - echo -e "\n\n ✅ Automatic disks unlock configuration added." fi # Generate automatic unlock configuration in ./nix-config/disks/snapraid.nix <-- } @@ -522,7 +524,7 @@ deploy() { echo -e "\n\n 🔄 Deploying to the remote server..." nix run github:nix-community/nixos-anywhere -- \ --generate-hardware-config nixos-generate-config ./nix-config/hardware-configuration.nix \ - --flake ./nix-config/flake.nix#numbus-server \ + --flake ./nix-config#numbus-server \ --extra-files extra-files \ --chown "/home/numbus-admin/" 1000:1000 \ --target-host nixos@$TARGET_HOST