diff options
-rw-r--r-- | desktop/vars.nix | 1 | ||||
-rw-r--r-- | disko/sda-simple.nix | 2 | ||||
-rw-r--r-- | live/iso.nix | 15 |
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 '') ]; }; |