From 2704e92aea763b37806ad68dc0f0c5d3ed043e0b Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 1 Feb 2024 10:32:34 -0700 Subject: [PATCH] chore: reorder and add comments to make code cleaner --- install.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/install.sh b/install.sh index 3fb8a75..402790e 100644 --- a/install.sh +++ b/install.sh @@ -2,34 +2,34 @@ # then sets it as a variable for hibernation support ramTotal=$(free -h | awk '/^Mem:/{print $2}'| awk -FG {'print$1'}) -# Detect and list the drives. -lsblk -f - # Step 1: Choosing the drive for the installation -# Choice the drive to use : +## Detect and list the drives. +lsblk -f + +## Choice the drive to use : echo "----------" echo "Which drive do we want to use for this installation?" echo "For example /dev/sda or /dev/nvme0n1" read driveName -# Download Disko file +## Download Disko file cd /tmp curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/partitions/luks-btrfs-subvolumes.nix -o /tmp/disko-config.nix -# Replace drive in Disko file +## Replace drive in Disko file sudo sed -i "s#/dev/sda#$driveName#g" /tmp/disko-config.nix # Step 2: Partitioning the drive used for the installation -# Run Disko to partition the disk +## Run Disko to partition the disk sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko -- --mode disko /tmp/disko-config.nix -# Generate Nix configuration +## Generate Nix configuration sudo nixos-generate-config --no-filesystems --root /mnt sudo mv /tmp/disko-config.nix /mnt/etc/nixos -# Downloads and places the predefinded generic flake to use +## Downloads and places the predefinded generic flake to use curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/configuration.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/home.nix > home.nix; sudo mv -f home.nix /mnt/etc/nixos/