From 275f6ca934a5ccf9aa1247cfe5fb375a2962518f Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 17 Feb 2025 20:15:31 +0000 Subject: [PATCH 01/10] 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/10] 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/10] 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/10] 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/10] 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/10] 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/10] 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/10] 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/10] 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/10] 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