From 275f6ca934a5ccf9aa1247cfe5fb375a2962518f Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 17 Feb 2025 20:15:31 +0000 Subject: [PATCH 01/20] Edit install.sh --- install.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 5650cb2..9125a1c 100644 --- a/install.sh +++ b/install.sh @@ -47,7 +47,14 @@ Which device are you installing to? 4) Home Server (EDI) - Do Not Use 0) Generic EOF -read hostChoice + +echo "" + +read -p "Enter your choice: " hostChoice + +echo "" + +echo "The device selected: $hostChoice" if [ $hostChoice = 1 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/configuration.nix > vm.nix; sudo mv -f vm.nix /mnt/etc/nixos/ From b5c015aba0d9e63450cec5217b24a476e908ea63 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 17 Feb 2025 20:21:07 +0000 Subject: [PATCH 02/20] remove extra output that is not needed. --- install.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/install.sh b/install.sh index 9125a1c..d54e069 100644 --- a/install.sh +++ b/install.sh @@ -49,13 +49,9 @@ Which device are you installing to? EOF echo "" - read -p "Enter your choice: " hostChoice - echo "" -echo "The device selected: $hostChoice" - if [ $hostChoice = 1 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/configuration.nix > vm.nix; sudo mv -f vm.nix /mnt/etc/nixos/ sudo nixos-install --flake /mnt/etc/nixos#vm From 4d006c7b22d7e27fe0e4603b37eee251b42d3531 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 17 Feb 2025 20:28:22 +0000 Subject: [PATCH 03/20] fix disko --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index d54e069..7328a5e 100644 --- a/install.sh +++ b/install.sh @@ -23,7 +23,7 @@ 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 -sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko -- --mode disko /tmp/disko-config.nix +sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode destroy,format,mount /tmp/disk-config.nix ## Generate Nix configuration sudo nixos-generate-config --no-filesystems --root /mnt From 3986db7dc3bbb8f962e7dea9e5155360ee293b8f Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 17 Feb 2025 20:32:37 +0000 Subject: [PATCH 04/20] fix path for the vm config --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 7328a5e..c527af7 100644 --- a/install.sh +++ b/install.sh @@ -53,7 +53,7 @@ read -p "Enter your choice: " hostChoice echo "" if [ $hostChoice = 1 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/configuration.nix > vm.nix; sudo mv -f vm.nix /mnt/etc/nixos/ + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/vm/configuration.nix > vm.nix; sudo mv -f vm.nix /mnt/etc/nixos/ sudo nixos-install --flake /mnt/etc/nixos#vm elif [ $hostChoice = 2 ]; then From 4ab438ece0d3e59d81b27590f6977af869ecb929 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 17 Feb 2025 21:14:31 +0000 Subject: [PATCH 05/20] fix typo for filename --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index c527af7..9e0b93b 100644 --- a/install.sh +++ b/install.sh @@ -15,7 +15,7 @@ read driveName ## Download Disko file cd /tmp -curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/partitions/luks-btrfs-subvolumes.nix -o /tmp/disko-config.nix +curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/partitions/luks-btrfs-subvolumes.nix -o /tmp/disk-config.nix ## Replace drive in Disko file sudo sed -i "s#/dev/sda#$driveName#g" /tmp/disko-config.nix From 5d69ac345eccfa415d0090c4eb4d498cd7a5f026 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 17 Feb 2025 21:15:43 +0000 Subject: [PATCH 06/20] fix another typo --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 9e0b93b..7249777 100644 --- a/install.sh +++ b/install.sh @@ -15,7 +15,7 @@ read driveName ## Download Disko file cd /tmp -curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/partitions/luks-btrfs-subvolumes.nix -o /tmp/disk-config.nix +curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/partitions/luks-btrfs-subvolumes.nix -o /tmp/disko-config.nix ## Replace drive in Disko file sudo sed -i "s#/dev/sda#$driveName#g" /tmp/disko-config.nix @@ -23,7 +23,7 @@ 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 -sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode destroy,format,mount /tmp/disk-config.nix +sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode destroy,format,mount /tmp/disko-config.nix ## Generate Nix configuration sudo nixos-generate-config --no-filesystems --root /mnt From 48457d25f12fc62cd482bc9294e1b541b52d8cf6 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 17 Feb 2025 21:23:27 +0000 Subject: [PATCH 07/20] copy disko file before generating the default configuration --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 7249777..2f66103 100644 --- a/install.sh +++ b/install.sh @@ -26,8 +26,8 @@ sudo sed -i "s#/dev/sda#$driveName#g" /tmp/disko-config.nix sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode destroy,format,mount /tmp/disko-config.nix ## Generate Nix configuration -sudo nixos-generate-config --no-filesystems --root /mnt sudo mv /tmp/disko-config.nix /mnt/etc/nixos +sudo nixos-generate-config --no-filesystems --root /mnt ## 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/ From a6574091a821d33d938ec2a8c7d9a0f1d477d270 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 17 Feb 2025 21:33:16 +0000 Subject: [PATCH 08/20] Edit install.sh --- install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 2f66103..280930a 100644 --- a/install.sh +++ b/install.sh @@ -26,7 +26,6 @@ sudo sed -i "s#/dev/sda#$driveName#g" /tmp/disko-config.nix sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode destroy,format,mount /tmp/disko-config.nix ## Generate Nix configuration -sudo mv /tmp/disko-config.nix /mnt/etc/nixos sudo nixos-generate-config --no-filesystems --root /mnt ## Downloads and places the predefinded generic flake to use @@ -52,6 +51,9 @@ echo "" read -p "Enter your choice: " hostChoice echo "" +## Copies over the disko file for running `nixos-install` +sudo mv /tmp/disko-config.nix /mnt/etc/nixos + if [ $hostChoice = 1 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/vm/configuration.nix > vm.nix; sudo mv -f vm.nix /mnt/etc/nixos/ sudo nixos-install --flake /mnt/etc/nixos#vm From cd1bea5399b308494d5a501d187e27c4b6a3fc2c Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 17 Feb 2025 23:39:36 +0000 Subject: [PATCH 09/20] remove RAM math --- install.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/install.sh b/install.sh index 280930a..3c96352 100644 --- a/install.sh +++ b/install.sh @@ -1,7 +1,3 @@ -# Figure out how much RAM the system has -# then sets it as a variable for hibernation support -ramTotal=$(free -h | awk '/^Mem:/{print $2}'| awk -FG {'print$1'}) - # Step 1: Choosing the drive for the installation ## Detect and list the drives. From cf07fd267e029abc151849084b3d99eaf45c6eb9 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 18 Feb 2025 00:26:22 +0000 Subject: [PATCH 10/20] Edit install.sh --- install.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index 3c96352..da8dbcb 100644 --- a/install.sh +++ b/install.sh @@ -39,7 +39,6 @@ Which device are you installing to? 1) Virtual Machine 2) Lemur Pro 13 (Garrus) 3) nebula49 (Shepard) - 4) Home Server (EDI) - Do Not Use 0) Generic EOF @@ -50,6 +49,9 @@ echo "" ## Copies over the disko file for running `nixos-install` sudo mv /tmp/disko-config.nix /mnt/etc/nixos +## Workaround for `no free space` error +sudo nix-collect-garbage + if [ $hostChoice = 1 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/vm/configuration.nix > vm.nix; sudo mv -f vm.nix /mnt/etc/nixos/ sudo nixos-install --flake /mnt/etc/nixos#vm @@ -64,10 +66,6 @@ elif [ $hostChoice = 3 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/desktops/gnome.nix > gnome.nix; sudo mv -f gnome.nix /mnt/etc/nixos/ sudo nixos-install --flake /mnt/etc/nixos#shepard -elif [ $hostChoice = 4 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/edi/configuration.nix > edi.nix; sudo mv -f edi.nix /mnt/etc/nixos/ - sudo nixos-install --flake /mnt/etc/nixos#edi - elif [ $hostChoice = 0 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ sudo nixos-install --flake /mnt/etc/nixos#nixos From cbb64273aea14d25009c9b9824b5aba4454af899 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 18 Feb 2025 16:02:29 +0000 Subject: [PATCH 11/20] Edit install.sh --- install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index da8dbcb..f392bb4 100644 --- a/install.sh +++ b/install.sh @@ -7,7 +7,10 @@ lsblk -f echo "----------" echo "Which drive do we want to use for this installation?" echo "For example /dev/sda or /dev/nvme0n1" -read driveName + +echo "" +read -p "Enter your choice: " driveName +echo "" ## Download Disko file cd /tmp From 1f2d03cf1af7c0fea31ebcb8d8db19efc87c1c70 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 18 Feb 2025 16:29:28 +0000 Subject: [PATCH 12/20] Edit install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index f392bb4..691fdab 100644 --- a/install.sh +++ b/install.sh @@ -14,7 +14,7 @@ echo "" ## Download Disko file cd /tmp -curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/partitions/luks-btrfs-subvolumes.nix -o /tmp/disko-config.nix +curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/partitions/luks-lvm.nix -o /tmp/disko-config.nix ## Replace drive in Disko file sudo sed -i "s#/dev/sda#$driveName#g" /tmp/disko-config.nix From 82a7d56a2c190071f033b7bf47afdb2317fc2bae Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 18 Feb 2025 16:45:15 +0000 Subject: [PATCH 13/20] debugging mounted error for bootloader --- install.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 691fdab..95e1f7d 100644 --- a/install.sh +++ b/install.sh @@ -27,6 +27,12 @@ sudo nix --experimental-features "nix-command flakes" run github:nix-community/d ## Generate Nix configuration sudo nixos-generate-config --no-filesystems --root /mnt +## Copies over the disko file for running `nixos-install` +sudo mv /tmp/disko-config.nix /mnt/etc/nixos + +## Confirm that partitions are mounted +mount | grep /mnt + ## 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/ @@ -34,6 +40,9 @@ curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/flake.nix > flake.nix; 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/ +## Confirm that partitions are mounted +mount | grep /mnt + # Step 3: Choosing a predefined system flake file to use cat << EOF @@ -49,9 +58,6 @@ echo "" read -p "Enter your choice: " hostChoice echo "" -## Copies over the disko file for running `nixos-install` -sudo mv /tmp/disko-config.nix /mnt/etc/nixos - ## Workaround for `no free space` error sudo nix-collect-garbage From 014711310c71b1f2eabc014c5857b671a1ad59d4 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 18 Feb 2025 16:48:21 +0000 Subject: [PATCH 14/20] fix debug --- install.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 95e1f7d..f4cced8 100644 --- a/install.sh +++ b/install.sh @@ -31,7 +31,7 @@ sudo nixos-generate-config --no-filesystems --root /mnt sudo mv /tmp/disko-config.nix /mnt/etc/nixos ## Confirm that partitions are mounted -mount | grep /mnt +lsblk -f ## 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/ @@ -40,9 +40,6 @@ curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/flake.nix > flake.nix; 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/ -## Confirm that partitions are mounted -mount | grep /mnt - # Step 3: Choosing a predefined system flake file to use cat << EOF From 77f1f7b88e09d5b9d3dc2d9627397f2849fdacf8 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 18 Feb 2025 16:53:46 +0000 Subject: [PATCH 15/20] update disko command to avoid the prompt --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index f4cced8..d371561 100644 --- a/install.sh +++ b/install.sh @@ -22,7 +22,7 @@ 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 -sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode destroy,format,mount /tmp/disko-config.nix +sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode destroy,format,mount /tmp/disko-config.nix --yes-wipe-all-disks ## Generate Nix configuration sudo nixos-generate-config --no-filesystems --root /mnt From e93ce9f4284fbad668c25b507a605e72b50ef863 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 18 Feb 2025 16:59:35 +0000 Subject: [PATCH 16/20] update wording for the choices --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index d371561..445b130 100644 --- a/install.sh +++ b/install.sh @@ -9,7 +9,7 @@ echo "Which drive do we want to use for this installation?" echo "For example /dev/sda or /dev/nvme0n1" echo "" -read -p "Enter your choice: " driveName +read -p "Enter your drive choice: " driveName echo "" ## Download Disko file @@ -52,7 +52,7 @@ Which device are you installing to? EOF echo "" -read -p "Enter your choice: " hostChoice +read -p "Enter your device choice: " hostChoice echo "" ## Workaround for `no free space` error From 11c469dd1246a537484dfc549aafbbc774b31286 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 18 Feb 2025 17:14:31 +0000 Subject: [PATCH 17/20] testing to see if I can remove the workaround --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 445b130..71c24e1 100644 --- a/install.sh +++ b/install.sh @@ -56,7 +56,7 @@ read -p "Enter your device choice: " hostChoice echo "" ## Workaround for `no free space` error -sudo nix-collect-garbage +#sudo nix-collect-garbage if [ $hostChoice = 1 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/vm/configuration.nix > vm.nix; sudo mv -f vm.nix /mnt/etc/nixos/ From a691a7f19d49d233ab5b93240a0fab9abe36f10f Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 18 Feb 2025 10:28:04 -0700 Subject: [PATCH 18/20] remove workaround completely --- install.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/install.sh b/install.sh index 71c24e1..bc80e17 100644 --- a/install.sh +++ b/install.sh @@ -55,9 +55,6 @@ echo "" read -p "Enter your device choice: " hostChoice echo "" -## Workaround for `no free space` error -#sudo nix-collect-garbage - if [ $hostChoice = 1 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/vm/configuration.nix > vm.nix; sudo mv -f vm.nix /mnt/etc/nixos/ sudo nixos-install --flake /mnt/etc/nixos#vm From a3fdaabf1f8b291066d847cbfd5755ac373dbfdd Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 18 Feb 2025 17:29:48 +0000 Subject: [PATCH 19/20] download gnome.nix for nixos device --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index bc80e17..6d33ee9 100644 --- a/install.sh +++ b/install.sh @@ -71,6 +71,7 @@ elif [ $hostChoice = 3 ]; then elif [ $hostChoice = 0 ]; then 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/desktops/gnome.nix > gnome.nix; sudo mv -f gnome.nix /mnt/etc/nixos/ sudo nixos-install --flake /mnt/etc/nixos#nixos fi From 4edb16d2122ef10c046a6dda5f89d1b381f6ce14 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 18 Feb 2025 18:14:45 +0000 Subject: [PATCH 20/20] switch back to btrfs from luks lvm --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 6d33ee9..869e7a2 100644 --- a/install.sh +++ b/install.sh @@ -14,7 +14,7 @@ echo "" ## Download Disko file cd /tmp -curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/partitions/luks-lvm.nix -o /tmp/disko-config.nix +curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/partitions/luks-btrfs-subvolumes.nix -o /tmp/disko-config.nix ## Replace drive in Disko file sudo sed -i "s#/dev/sda#$driveName#g" /tmp/disko-config.nix