aboutsummaryrefslogtreecommitdiff
path: root/live/iso.nix
diff options
context:
space:
mode:
authorPreston Pan <ret2pop@gmail.com>2025-01-09 18:37:35 -0800
committerPreston Pan <ret2pop@gmail.com>2025-01-09 18:37:35 -0800
commit8ed8dd2e31147929b1847d1147b629baacdd892f (patch)
tree370cec9441e25138b77a86066c8fcbc3cfabdf66 /live/iso.nix
parentace716b0e28a2e3654166bdbccbe0a2b621ba254 (diff)
script should maybe be okay now?
Diffstat (limited to 'live/iso.nix')
-rw-r--r--live/iso.nix15
1 files changed, 10 insertions, 5 deletions
diff --git a/live/iso.nix b/live/iso.nix
index ad6484c..54fd079 100644
--- a/live/iso.nix
+++ b/live/iso.nix
@@ -126,22 +126,27 @@
''
#!/usr/bin/env bash
set -euo pipefail
-
if [ "$(id -u)" -eq 0 ]; then
echo "ERROR! $(basename "$0") should be run as a regular user"
exit 1
fi
+if [ ! -f "/tmp/secret.key" ]; then
+ echo "ERROR: You must create a passphrase in /tmp/secret.key for full disk encryption."
+ exit 1
+fi
+
if [ ! -d "$HOME/toughnix/" ]; then
cd $HOME
git clone https://git.nullring.xyz/toughnix.git
fi
-
vim "$HOME/toughnix/desktop/vars.nix"
-DISK="$(gum input --placeholder "Disk (ex: /dev/sda)")"
+vim "$HOME/toughnix/disko/sda-simple.nix"
-gum confirm --default=false "🔥 🔥 🔥 WARNING!!!! This will ERASE ALL DATA on the disk $DISK. Are you sure you want to continue?"
-sudo nix run 'github:nix-community/disko/latest#disko-install' -- --write-efi-boot-entries --flake './toughnix#continuity-dell' --disk main "$DISK"
+gum confirm --default=false "🔥 🔥 🔥 WARNING!!!! This will ERASE ALL DATA on the disk. Are you sure you want to continue?"
+sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode destroy,format,mount "$HOME/toughnix/disko/sda-simple.nix"
+cd /mnt
+sudo nixos-install --flake $HOME/toughnix#continuity-dell
'')
];
};