aboutsummaryrefslogtreecommitdiff
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
parentace716b0e28a2e3654166bdbccbe0a2b621ba254 (diff)
script should maybe be okay now?
-rw-r--r--desktop/vars.nix1
-rw-r--r--disko/sda-simple.nix2
-rw-r--r--live/iso.nix15
3 files changed, 13 insertions, 5 deletions
diff --git a/desktop/vars.nix b/desktop/vars.nix
index d221dd2..760566b 100644
--- a/desktop/vars.nix
+++ b/desktop/vars.nix
@@ -1,3 +1,4 @@
+# Change the following variables
{
# set your host name.
hostName = "continuity-dell";
diff --git a/disko/sda-simple.nix b/disko/sda-simple.nix
index 7e275e5..d723bd5 100644
--- a/disko/sda-simple.nix
+++ b/disko/sda-simple.nix
@@ -1,8 +1,10 @@
+# CHANGE THE DISK YOU WANT TO FORMAT NOW
{
disko.devices = {
disk = {
main = {
type = "disk";
+ # CHANGEME change to the disk you want to format
device = "/dev/sda";
content = {
type = "gpt";
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
'')
];
};