From cbb64273aea14d25009c9b9824b5aba4454af899 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 18 Feb 2025 16:02:29 +0000 Subject: [PATCH 01/10] 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 02/10] 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 03/10] 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 04/10] 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 05/10] 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 06/10] 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 07/10] 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 08/10] 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 09/10] 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 10/10] 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