From e05760dde35f90f8e4d6d7017475748db2f2d51a Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 8 Jan 2024 14:59:17 +0000 Subject: [PATCH 001/103] Edit VM options to use flake file and use nixos-install flake option --- install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index be7ecbe..bd601bd 100644 --- a/install.sh +++ b/install.sh @@ -79,7 +79,8 @@ elif [ $deviceChoice = 6 ]; then sudo sed -i "11 i \ ./darp9.nix" /mnt/etc/nixos/configuration.nix elif [ $deviceChoice = 7 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/vm.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ + #curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/vm.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ fi cat << EOF @@ -115,4 +116,5 @@ elif [ $desktopChoice = 4 ]; then fi # Install -sudo nixos-install +sudo nixos-install --impure --flake /mnt/etc/nixos/flake.nix +#sudo nixos-install From a11e58c93bdef7b8c2461e9d2e19a436dbc55c92 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 8 Jan 2024 16:42:17 +0000 Subject: [PATCH 002/103] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index bd601bd..8005f68 100644 --- a/install.sh +++ b/install.sh @@ -116,5 +116,5 @@ elif [ $desktopChoice = 4 ]; then fi # Install -sudo nixos-install --impure --flake /mnt/etc/nixos/flake.nix +sudo nixos-install --impure --flake /mnt/etc/nixos/flake.nix#vm #sudo nixos-install From cd4523a6aa461a73439aecc33ce98477949ea35c Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 8 Jan 2024 16:43:26 +0000 Subject: [PATCH 003/103] fix path --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 8005f68..58a370a 100644 --- a/install.sh +++ b/install.sh @@ -116,5 +116,5 @@ elif [ $desktopChoice = 4 ]; then fi # Install -sudo nixos-install --impure --flake /mnt/etc/nixos/flake.nix#vm +sudo nixos-install --impure --flake /mnt/etc/nixos#vm #sudo nixos-install From be6f524998cc72fdef9b8d9cc5208b7ea7261d85 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 8 Jan 2024 16:44:14 +0000 Subject: [PATCH 004/103] Fix flake path for VM --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 58a370a..b378c30 100644 --- a/install.sh +++ b/install.sh @@ -79,7 +79,7 @@ elif [ $deviceChoice = 6 ]; then sudo sed -i "11 i \ ./darp9.nix" /mnt/etc/nixos/configuration.nix elif [ $deviceChoice = 7 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/systems/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ #curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/vm.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ fi From 1e37870e70b5be8e3876de9420d9f46ac7ab1b1a Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 8 Jan 2024 16:48:10 +0000 Subject: [PATCH 005/103] Disable downloading the configuration.nix for now --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index b378c30..ac2aa3a 100644 --- a/install.sh +++ b/install.sh @@ -32,7 +32,7 @@ sudo mv /tmp/disko-config.nix /mnt/etc/nixos echo "Default username and password are in the configuration.nix file" echo "Password is hashed so it is not plaintext" -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/configuration.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ #curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/programs.nix > programs.nix; sudo mv -f programs.nix /mnt/etc/nixos/ cat << EOF From ff818891e46105206ddcaafebbb4fa4b24b00db6 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 8 Jan 2024 17:14:33 +0000 Subject: [PATCH 006/103] Add if/then --- install.sh | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index ac2aa3a..9351704 100644 --- a/install.sh +++ b/install.sh @@ -116,5 +116,26 @@ elif [ $desktopChoice = 4 ]; then fi # Install -sudo nixos-install --impure --flake /mnt/etc/nixos#vm +if [ $deviceChoice = 1 ]; then + echo "shepard" + +elif [ $deviceChoice = 2 ]; then + echo "garrus" + +elif [ $deviceChoice = 3 ]; then + echo "hp-omen" + +elif [ $deviceChoice = 4 ]; then + echo "pbp" + +elif [ $deviceChoice = 5 ]; then + echo "thelio-nvidia" + +elif [ $deviceChoice = 6 ]; then + echo "darp9" + +elif [ $deviceChoice = 7 ]; then + sudo nixos-install --impure --flake /mnt/etc/nixos#vm + fi + #sudo nixos-install From d947ea93b2971ed7395a4287734d652a4bc6b344 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 8 Jan 2024 18:27:35 +0000 Subject: [PATCH 007/103] Test new nixos-install --- install.sh | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/install.sh b/install.sh index 9351704..ed942bb 100644 --- a/install.sh +++ b/install.sh @@ -116,26 +116,5 @@ elif [ $desktopChoice = 4 ]; then fi # Install -if [ $deviceChoice = 1 ]; then - echo "shepard" - -elif [ $deviceChoice = 2 ]; then - echo "garrus" - -elif [ $deviceChoice = 3 ]; then - echo "hp-omen" - -elif [ $deviceChoice = 4 ]; then - echo "pbp" - -elif [ $deviceChoice = 5 ]; then - echo "thelio-nvidia" - -elif [ $deviceChoice = 6 ]; then - echo "darp9" - -elif [ $deviceChoice = 7 ]; then - sudo nixos-install --impure --flake /mnt/etc/nixos#vm - fi - +sudo nixos-install --flake #sudo nixos-install From 928af8b3d7a27398a42cd123f0392d871c05c5d3 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 8 Jan 2024 18:31:29 +0000 Subject: [PATCH 008/103] You do need to set the system name in the nixos-install command for it to work --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index ed942bb..6ef4bc3 100644 --- a/install.sh +++ b/install.sh @@ -116,5 +116,5 @@ elif [ $desktopChoice = 4 ]; then fi # Install -sudo nixos-install --flake +sudo nixos-install --flake /mnt/etc/nixos#vm #sudo nixos-install From 6390329d069603acc40e35effe06a384a47753f3 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 9 Jan 2024 14:35:17 +0000 Subject: [PATCH 009/103] Add generic flake option --- install.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 6ef4bc3..c4a8521 100644 --- a/install.sh +++ b/install.sh @@ -45,7 +45,7 @@ Which device are you installing to? 5) Thelio NVIDIA (thelio-b1) 6) Darter Pro (darp9) 7) Virtual Machine - 0) None or N/A + 0) Generic EOF read deviceChoice @@ -81,6 +81,10 @@ elif [ $deviceChoice = 6 ]; then elif [ $deviceChoice = 7 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/systems/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ #curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/vm.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ + +elif [ $deviceChoice = 7 ]; then + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ + fi cat << EOF @@ -116,5 +120,5 @@ elif [ $desktopChoice = 4 ]; then fi # Install -sudo nixos-install --flake /mnt/etc/nixos#vm +sudo nixos-install --flake /mnt/etc/nixos#nixos #sudo nixos-install From 14b72a9dcd7fdaf4d2423af90bb74865af7c3e21 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 9 Jan 2024 14:35:42 +0000 Subject: [PATCH 010/103] Fix new option --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index c4a8521..9d3c860 100644 --- a/install.sh +++ b/install.sh @@ -82,7 +82,7 @@ elif [ $deviceChoice = 7 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/systems/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ #curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/vm.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ -elif [ $deviceChoice = 7 ]; then +elif [ $deviceChoice = 0 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ fi From 490a41279522926dc40fdf59d00a95cd8193bcd1 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 9 Jan 2024 19:49:47 +0000 Subject: [PATCH 011/103] Switch other systems to the generic flake and remove extra line at the end of the script --- install.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index 9d3c860..c3ec5cd 100644 --- a/install.sh +++ b/install.sh @@ -53,15 +53,15 @@ read deviceChoice # Update the second command to the file name that matches your system .nix file if [ $deviceChoice = 1 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/x86_64/shepard/configuration.nix > shepard.nix; sudo mv -f shepard.nix /mnt/etc/nixos/ + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ sudo sed -i "11 i \ ./shepard.nix" /mnt/etc/nixos/configuration.nix elif [ $deviceChoice = 2 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/x86_64/garrus/configuration.nix > garrus.nix; sudo mv -f garrus.nix /mnt/etc/nixos/ + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ sudo sed -i "11 i \ ./garrus.nix" /mnt/etc/nixos/configuration.nix elif [ $deviceChoice = 3 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/x86_64/hp-omen.nix > hp-omen.nix; sudo mv -f hp-omen.nix /mnt/etc/nixos/ + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ sudo sed -i "11 i \ ./hp-omen.nix" /mnt/etc/nixos/configuration.nix elif [ $deviceChoice = 4 ]; then @@ -69,10 +69,8 @@ elif [ $deviceChoice = 4 ]; then sudo sed -i "11 i \ ./jaal.nix" /mnt/etc/nixos/configuration.nix elif [ $deviceChoice = 5 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/x86_64/thelio-nvidia.nix > thelio-nvidia.nix; sudo mv -f thelio-nvidia.nix /mnt/etc/nixos/ + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ sudo sed -i "11 i \ ./thelio-nvidia.nix" /mnt/etc/nixos/configuration.nix - # Disable latest kernel for Thelio with NVIDIA GPU - sudo sed -i "s/boot.kernelPackages/# boot.kernelPackages/g" /mnt/etc/nixos/configuration.nix elif [ $deviceChoice = 6 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/x86_64/darp9.nix > darp9.nix; sudo mv -f darp9.nix /mnt/etc/nixos/ From 3ed0d05b054f29f4fde690e3eeb57047fb1a9123 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 9 Jan 2024 19:55:22 +0000 Subject: [PATCH 012/103] Revert change but swap configuration.nix to flake.nix --- install.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index c3ec5cd..8ccf085 100644 --- a/install.sh +++ b/install.sh @@ -32,7 +32,7 @@ sudo mv /tmp/disko-config.nix /mnt/etc/nixos echo "Default username and password are in the configuration.nix file" echo "Password is hashed so it is not plaintext" -#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/flake/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ #curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/programs.nix > programs.nix; sudo mv -f programs.nix /mnt/etc/nixos/ cat << EOF @@ -53,15 +53,15 @@ read deviceChoice # Update the second command to the file name that matches your system .nix file if [ $deviceChoice = 1 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/x86_64/shepard/configuration.nix > shepard.nix; sudo mv -f shepard.nix /mnt/etc/nixos sudo sed -i "11 i \ ./shepard.nix" /mnt/etc/nixos/configuration.nix elif [ $deviceChoice = 2 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/x86_64/garrus/configuration.nix > garrus.nix; sudo mv -f garrus.nix /mnt/etc/nixos sudo sed -i "11 i \ ./garrus.nix" /mnt/etc/nixos/configuration.nix elif [ $deviceChoice = 3 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/x86_64/hp-omen/configuration.nix > hp-omen.nix; sudo mv -f hp-omen.nix /mnt/etc/nixos sudo sed -i "11 i \ ./hp-omen.nix" /mnt/etc/nixos/configuration.nix elif [ $deviceChoice = 4 ]; then @@ -69,7 +69,7 @@ elif [ $deviceChoice = 4 ]; then sudo sed -i "11 i \ ./jaal.nix" /mnt/etc/nixos/configuration.nix elif [ $deviceChoice = 5 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/x86_64/thelio-nvidia.nix > thelio-nvidia.nix; sudo mv -f thelio-nvidia.nix /mnt/etc/nixos sudo sed -i "11 i \ ./thelio-nvidia.nix" /mnt/etc/nixos/configuration.nix elif [ $deviceChoice = 6 ]; then From b5f977e403b36ddc25fa321c960ab8da69d8a091 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 9 Jan 2024 19:56:10 +0000 Subject: [PATCH 013/103] Update messaging --- install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 8ccf085..d8e4538 100644 --- a/install.sh +++ b/install.sh @@ -8,7 +8,6 @@ lsblk -f # Choice the drive to use : # 1. echo "----------" -echo "" echo "Which drive do we want to use for this installation?" read driveName @@ -29,8 +28,10 @@ sudo mv /tmp/disko-config.nix /mnt/etc/nixos # Copy my base nix configs over # Change the URL to match where you are hosting your .nix file(s). -echo "Default username and password are in the configuration.nix file" +echo "" +echo "Default username and password are in the flake.nix file" echo "Password is hashed so it is not plaintext" +echo "" curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ #curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/programs.nix > programs.nix; sudo mv -f programs.nix /mnt/etc/nixos/ From fb7de0dbe85cb7e9488b78425c8fef29f057a7a0 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 9 Jan 2024 20:02:19 +0000 Subject: [PATCH 014/103] Remove unneeded VM config.nix file --- install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install.sh b/install.sh index d8e4538..a80817f 100644 --- a/install.sh +++ b/install.sh @@ -79,7 +79,6 @@ elif [ $deviceChoice = 6 ]; then elif [ $deviceChoice = 7 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/systems/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ - #curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/vm.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ elif [ $deviceChoice = 0 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ From 1641a786f012983fb39905125b0dabf3221085d1 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 11 Jan 2024 18:56:30 +0000 Subject: [PATCH 015/103] Clean up comments in the code to make it more readable hopefully --- install.sh | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/install.sh b/install.sh index a80817f..73d3d2a 100644 --- a/install.sh +++ b/install.sh @@ -5,8 +5,9 @@ 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 : -# 1. echo "----------" echo "Which drive do we want to use for this installation?" read driveName @@ -18,6 +19,8 @@ curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/partitions/luks-btrfs-s # 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 sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko -- --mode disko /tmp/disko-config.nix @@ -25,16 +28,10 @@ sudo nix --experimental-features "nix-command flakes" run github:nix-community/d sudo nixos-generate-config --no-filesystems --root /mnt sudo mv /tmp/disko-config.nix /mnt/etc/nixos -# Copy my base nix configs over -# Change the URL to match where you are hosting your .nix file(s). - -echo "" -echo "Default username and password are in the flake.nix file" -echo "Password is hashed so it is not plaintext" -echo "" - +# Downloads and places the predefinded generic flake to use curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ -#curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/programs.nix > programs.nix; sudo mv -f programs.nix /mnt/etc/nixos/ + +# Step 3: Choosing a predefined system flake file to use cat << EOF @@ -50,9 +47,6 @@ Which device are you installing to? EOF read deviceChoice -# Change the URL to match where you are hosting your system .nix file -# Update the second command to the file name that matches your system .nix file - if [ $deviceChoice = 1 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/x86_64/shepard/configuration.nix > shepard.nix; sudo mv -f shepard.nix /mnt/etc/nixos sudo sed -i "11 i \ ./shepard.nix" /mnt/etc/nixos/configuration.nix @@ -85,6 +79,8 @@ elif [ $deviceChoice = 0 ]; then fi +# Step 4: Choosing a predefined desktop/window manager file to use + cat << EOF Which Desktop Environment do you want? @@ -96,9 +92,6 @@ Which Desktop Environment do you want? EOF read desktopChoice -# Change the URL to match where you are hosting your DE/WM .nix file -# Update the second command to the file name that matches your DE/WM .nix file - if [ $desktopChoice = 1 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/desktops/plasma.nix > plasma.nix; sudo mv -f plasma.nix /mnt/etc/nixos/ sudo sed -i "10 i \ ./plasma.nix" /mnt/etc/nixos/configuration.nix From 8d26d86a5d7a6f7bb1c6534c6339262eb54bc111 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 16 Jan 2024 16:23:22 +0000 Subject: [PATCH 016/103] Download home-manager file --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index 73d3d2a..5e9e993 100644 --- a/install.sh +++ b/install.sh @@ -30,6 +30,7 @@ sudo mv /tmp/disko-config.nix /mnt/etc/nixos # Downloads and places the predefinded generic flake to use curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ +curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/home.nix > home.nix; sudo mv -f home.nix /mnt/etc/nixos/ # Step 3: Choosing a predefined system flake file to use From 8063942f61ebd625d1a30871843ddf3419d457c5 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 16 Jan 2024 17:35:02 +0000 Subject: [PATCH 017/103] Add Dev One, remove desktops for now. --- install.sh | 40 +++++----------------------------------- 1 file changed, 5 insertions(+), 35 deletions(-) diff --git a/install.sh b/install.sh index 5e9e993..7d04c91 100644 --- a/install.sh +++ b/install.sh @@ -44,6 +44,7 @@ Which device are you installing to? 5) Thelio NVIDIA (thelio-b1) 6) Darter Pro (darp9) 7) Virtual Machine + 8) HP Dev One 0) Generic EOF read deviceChoice @@ -75,42 +76,11 @@ elif [ $deviceChoice = 6 ]; then elif [ $deviceChoice = 7 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/systems/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ +elif [ $deviceChoice = 8 ]; then + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/systems/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ + sudo nixos-install --flake /mnt/etc/nixos#dev-one + elif [ $deviceChoice = 0 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ fi - -# Step 4: Choosing a predefined desktop/window manager file to use - -cat << EOF - -Which Desktop Environment do you want? - 1) Plasma - 2) GNOME - 3) Pantheon - 4) Sway - 0) None or N/A -EOF -read desktopChoice - -if [ $desktopChoice = 1 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/desktops/plasma.nix > plasma.nix; sudo mv -f plasma.nix /mnt/etc/nixos/ - sudo sed -i "10 i \ ./plasma.nix" /mnt/etc/nixos/configuration.nix - -elif [ $desktopChoice = 2 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/desktops/gnome.nix > gnome.nix; sudo mv -f gnome.nix /mnt/etc/nixos/ - sudo sed -i "10 i \ ./gnome.nix" /mnt/etc/nixos/configuration.nix - -elif [ $desktopChoice = 3 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/desktops/pantheon.nix > pantheon.nix; sudo mv -f pantheon.nix /mnt/etc/nixos/ - sudo sed -i "10 i \ ./pantheon.nix" /mnt/etc/nixos/configuration.nix - -elif [ $desktopChoice = 4 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/desktops/sway.nix > sway.nix; sudo mv -f sway.nix /mnt/etc/nixos/ - sudo sed -i "10 i \ ./sway.nix" /mnt/etc/nixos/configuration.nix - -fi - -# Install -sudo nixos-install --flake /mnt/etc/nixos#nixos -#sudo nixos-install From 553650b883fe0f2b3d8cd21db27f280cd1dc074b Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 16 Jan 2024 17:39:34 +0000 Subject: [PATCH 018/103] Update paths for dev-one and nixos generic --- install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install.sh b/install.sh index 7d04c91..bba7011 100644 --- a/install.sh +++ b/install.sh @@ -75,9 +75,11 @@ elif [ $deviceChoice = 6 ]; then elif [ $deviceChoice = 7 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/systems/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ + sudo nixos-install --flake /mnt/etc/nixos#nixos elif [ $deviceChoice = 8 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/systems/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#dev-one elif [ $deviceChoice = 0 ]; then From 9ff54a086411af1058a851ff42ed9a5c1576940a Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 16 Jan 2024 17:47:02 +0000 Subject: [PATCH 019/103] Update install.sh --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index bba7011..09c566a 100644 --- a/install.sh +++ b/install.sh @@ -74,11 +74,11 @@ elif [ $deviceChoice = 6 ]; then sudo sed -i "11 i \ ./darp9.nix" /mnt/etc/nixos/configuration.nix elif [ $deviceChoice = 7 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/systems/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ sudo nixos-install --flake /mnt/etc/nixos#nixos elif [ $deviceChoice = 8 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/systems/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/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#dev-one From 1d5a54e841400fcbcfc7c557da0a64d09fbc6d88 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 16 Jan 2024 18:03:15 +0000 Subject: [PATCH 020/103] remove other devices for now. --- install.sh | 37 ++++--------------------------------- 1 file changed, 4 insertions(+), 33 deletions(-) diff --git a/install.sh b/install.sh index 09c566a..8a97160 100644 --- a/install.sh +++ b/install.sh @@ -37,47 +37,18 @@ curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/home.nix > home.nix; s cat << EOF Which device are you installing to? - 1) Home Desktop - Shepard - 2) Galago Pro (galp3-b) - Garrus - 3) HP Omen (15-dh0015nr) - 4) Pinebook Pro - Jaal - 5) Thelio NVIDIA (thelio-b1) - 6) Darter Pro (darp9) - 7) Virtual Machine - 8) HP Dev One + 1) Virtual Machine + 2) HP Dev One 0) Generic EOF read deviceChoice if [ $deviceChoice = 1 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/x86_64/shepard/configuration.nix > shepard.nix; sudo mv -f shepard.nix /mnt/etc/nixos - sudo sed -i "11 i \ ./shepard.nix" /mnt/etc/nixos/configuration.nix - -elif [ $deviceChoice = 2 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/x86_64/garrus/configuration.nix > garrus.nix; sudo mv -f garrus.nix /mnt/etc/nixos - sudo sed -i "11 i \ ./garrus.nix" /mnt/etc/nixos/configuration.nix - -elif [ $deviceChoice = 3 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/x86_64/hp-omen/configuration.nix > hp-omen.nix; sudo mv -f hp-omen.nix /mnt/etc/nixos - sudo sed -i "11 i \ ./hp-omen.nix" /mnt/etc/nixos/configuration.nix - -elif [ $deviceChoice = 4 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/aarch64/jaal/pbp.nix > jaal.nix; sudo mv -f jaal.nix /mnt/etc/nixos/ - sudo sed -i "11 i \ ./jaal.nix" /mnt/etc/nixos/configuration.nix - -elif [ $deviceChoice = 5 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/x86_64/thelio-nvidia.nix > thelio-nvidia.nix; sudo mv -f thelio-nvidia.nix /mnt/etc/nixos - sudo sed -i "11 i \ ./thelio-nvidia.nix" /mnt/etc/nixos/configuration.nix - -elif [ $deviceChoice = 6 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/x86_64/darp9.nix > darp9.nix; sudo mv -f darp9.nix /mnt/etc/nixos/ - sudo sed -i "11 i \ ./darp9.nix" /mnt/etc/nixos/configuration.nix - -elif [ $deviceChoice = 7 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/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 -elif [ $deviceChoice = 8 ]; then +elif [ $deviceChoice = 2 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/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#dev-one From 5cacafbea4d4fb1d5478b065f9d72a0786cf0fe6 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 16 Jan 2024 19:53:00 +0000 Subject: [PATCH 021/103] Update VM setup --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 8a97160..ede6e2f 100644 --- a/install.sh +++ b/install.sh @@ -45,8 +45,8 @@ read deviceChoice if [ $deviceChoice = 1 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/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 + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/vm.nix > vm.nix; sudo mv -f vm.nix /mnt/etc/nixos/ + sudo nixos-install --flake /mnt/etc/nixos#vm elif [ $deviceChoice = 2 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ From 054635f1fcc69d28726075003cd8e81d46a1e763 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Wed, 17 Jan 2024 13:17:08 +0000 Subject: [PATCH 022/103] Update install.sh --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index ede6e2f..12fff6a 100644 --- a/install.sh +++ b/install.sh @@ -30,6 +30,7 @@ sudo mv /tmp/disko-config.nix /mnt/etc/nixos # Downloads and places the predefinded generic flake to use curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ +curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/configuration.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/home.nix > home.nix; sudo mv -f home.nix /mnt/etc/nixos/ # Step 3: Choosing a predefined system flake file to use From b637d3bfe2d1f15eb43485e2260e94aceefdfb36 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 18 Jan 2024 13:58:07 +0000 Subject: [PATCH 023/103] Update install.sh --- install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install.sh b/install.sh index 12fff6a..32a2e7d 100644 --- a/install.sh +++ b/install.sh @@ -28,6 +28,9 @@ sudo nix --experimental-features "nix-command flakes" run github:nix-community/d sudo nixos-generate-config --no-filesystems --root /mnt sudo mv /tmp/disko-config.nix /mnt/etc/nixos +# Removes generated configuration file as it's being replaced with our own +sudo rm /mnt/etc/nixos/configuration.nix + # Downloads and places the predefinded generic flake to use curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/configuration.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ From 7a6c1f5104e915c51c38ddfd11ce4df817ac117d Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 18 Jan 2024 14:02:57 +0000 Subject: [PATCH 024/103] Remove custom VM line --- install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install.sh b/install.sh index 32a2e7d..cf37b95 100644 --- a/install.sh +++ b/install.sh @@ -49,7 +49,6 @@ read deviceChoice if [ $deviceChoice = 1 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/vm.nix > vm.nix; sudo mv -f vm.nix /mnt/etc/nixos/ sudo nixos-install --flake /mnt/etc/nixos#vm elif [ $deviceChoice = 2 ]; then From 82791c73b16276f96d551ab4db5d63ae349f1e05 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 18 Jan 2024 14:20:22 +0000 Subject: [PATCH 025/103] Import vm configuration file --- install.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/install.sh b/install.sh index cf37b95..8a74ce3 100644 --- a/install.sh +++ b/install.sh @@ -28,9 +28,6 @@ sudo nix --experimental-features "nix-command flakes" run github:nix-community/d sudo nixos-generate-config --no-filesystems --root /mnt sudo mv /tmp/disko-config.nix /mnt/etc/nixos -# Removes generated configuration file as it's being replaced with our own -sudo rm /mnt/etc/nixos/configuration.nix - # Downloads and places the predefinded generic flake to use curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/configuration.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ @@ -49,6 +46,7 @@ read deviceChoice if [ $deviceChoice = 1 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/systems/vm.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ sudo nixos-install --flake /mnt/etc/nixos#vm elif [ $deviceChoice = 2 ]; then From 6fe8c907b251964bdc4ce468520dafa6c906eaa9 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 18 Jan 2024 14:23:43 +0000 Subject: [PATCH 026/103] Add example of drive path --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index 8a74ce3..20c8475 100644 --- a/install.sh +++ b/install.sh @@ -10,6 +10,7 @@ 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 From 09a5f2418544ac949ec4eff0b883dcfc76bc3b6e Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 18 Jan 2024 14:24:26 +0000 Subject: [PATCH 027/103] Move fi over to make the code look cleaner --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 20c8475..1f9d314 100644 --- a/install.sh +++ b/install.sh @@ -58,4 +58,4 @@ elif [ $deviceChoice = 2 ]; then elif [ $deviceChoice = 0 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ - fi +fi From d355c4ec3eda299db7947c75e49978bc24c84c28 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 18 Jan 2024 15:46:32 +0000 Subject: [PATCH 028/103] Add generic option from the flake --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index 1f9d314..424737f 100644 --- a/install.sh +++ b/install.sh @@ -57,5 +57,6 @@ elif [ $deviceChoice = 2 ]; then elif [ $deviceChoice = 0 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ + sudo nixos-install --flake /mnt/etc/nixos#nixos fi From c3ae7e37dd618ed0e53f213b7f12dd76686cdb54 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 18 Jan 2024 16:51:13 +0000 Subject: [PATCH 029/103] Update install.sh --- install.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 424737f..8c08fe8 100644 --- a/install.sh +++ b/install.sh @@ -46,12 +46,10 @@ EOF read deviceChoice if [ $deviceChoice = 1 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/systems/vm.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/systems/vm.nix > vm.nix; sudo mv -f vm.nix /mnt/etc/nixos/ sudo nixos-install --flake /mnt/etc/nixos#vm elif [ $deviceChoice = 2 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/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#dev-one From a58e322a5b3517d35f1e3ee15cb04cc1af036b33 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Fri, 19 Jan 2024 13:38:59 +0000 Subject: [PATCH 030/103] Add thelio-b1 --- install.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/install.sh b/install.sh index 8c08fe8..cc50d89 100644 --- a/install.sh +++ b/install.sh @@ -53,6 +53,10 @@ elif [ $deviceChoice = 2 ]; 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#dev-one +elif [ $deviceChoice = 3 ]; then + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/systems/x86_64/thelio-nvidia.nix > thelio-nvidia.nix; sudo mv -f thelio-nvidia.nix /mnt/etc/nixos/ + sudo nixos-install --flake /mnt/etc/nixos#thelio-b1 + elif [ $deviceChoice = 0 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ sudo nixos-install --flake /mnt/etc/nixos#nixos From 4933f6d0e6c1ac2d9a19f7fbcae7603b51873638 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 23 Jan 2024 20:06:48 +0000 Subject: [PATCH 031/103] Add thelio-b1 --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index cc50d89..bfe0b00 100644 --- a/install.sh +++ b/install.sh @@ -41,6 +41,7 @@ cat << EOF Which device are you installing to? 1) Virtual Machine 2) HP Dev One + 3) Thelio B1 (NVIDIA) 0) Generic EOF read deviceChoice From 999acc5296a5c07e4fc81ae8fbea2f9ff8333ed3 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 25 Jan 2024 22:54:51 +0000 Subject: [PATCH 032/103] Add galp3b --- install.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/install.sh b/install.sh index bfe0b00..c3f4745 100644 --- a/install.sh +++ b/install.sh @@ -42,6 +42,7 @@ Which device are you installing to? 1) Virtual Machine 2) HP Dev One 3) Thelio B1 (NVIDIA) + 4) Galago Pro 3b (Garrus) 0) Generic EOF read deviceChoice @@ -58,6 +59,10 @@ elif [ $deviceChoice = 3 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/systems/x86_64/thelio-nvidia.nix > thelio-nvidia.nix; sudo mv -f thelio-nvidia.nix /mnt/etc/nixos/ sudo nixos-install --flake /mnt/etc/nixos#thelio-b1 +elif [ $deviceChoice = 4 ]; then + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/systems/x86_64/garrus/configuration.nix > garrus.nix; sudo mv -f garrus.nix /mnt/etc/nixos/ + sudo nixos-install --flake /mnt/etc/nixos#garrus + elif [ $deviceChoice = 0 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ sudo nixos-install --flake /mnt/etc/nixos#nixos From dc1aa54f75a3949631c5834dc054628a92e941b1 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 25 Jan 2024 23:59:37 +0000 Subject: [PATCH 033/103] GNOME download for Thelio B1 and Galago 3B --- install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install.sh b/install.sh index c3f4745..802859e 100644 --- a/install.sh +++ b/install.sh @@ -57,10 +57,12 @@ elif [ $deviceChoice = 2 ]; then elif [ $deviceChoice = 3 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/systems/x86_64/thelio-nvidia.nix > thelio-nvidia.nix; sudo mv -f thelio-nvidia.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#thelio-b1 elif [ $deviceChoice = 4 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/systems/x86_64/garrus/configuration.nix > garrus.nix; sudo mv -f garrus.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#garrus elif [ $deviceChoice = 0 ]; then From 50744893ffd4027ad1a8989cd390ad926614b6ca Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 30 Jan 2024 17:42:06 +0000 Subject: [PATCH 034/103] Change from flake to main branch now that nix-configs change has been merged. --- install.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index 802859e..35804a3 100644 --- a/install.sh +++ b/install.sh @@ -30,9 +30,9 @@ 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 -curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ -curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/configuration.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ -curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/home.nix > home.nix; sudo mv -f home.nix /mnt/etc/nixos/ +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/ # Step 3: Choosing a predefined system flake file to use @@ -48,7 +48,7 @@ EOF read deviceChoice if [ $deviceChoice = 1 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/systems/vm.nix > vm.nix; sudo mv -f vm.nix /mnt/etc/nixos/ + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/vm.nix > vm.nix; sudo mv -f vm.nix /mnt/etc/nixos/ sudo nixos-install --flake /mnt/etc/nixos#vm elif [ $deviceChoice = 2 ]; then @@ -56,12 +56,12 @@ elif [ $deviceChoice = 2 ]; then sudo nixos-install --flake /mnt/etc/nixos#dev-one elif [ $deviceChoice = 3 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/systems/x86_64/thelio-nvidia.nix > thelio-nvidia.nix; sudo mv -f thelio-nvidia.nix /mnt/etc/nixos/ + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/x86_64/thelio-nvidia.nix > thelio-nvidia.nix; sudo mv -f thelio-nvidia.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#thelio-b1 elif [ $deviceChoice = 4 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/systems/x86_64/garrus/configuration.nix > garrus.nix; sudo mv -f garrus.nix /mnt/etc/nixos/ + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/x86_64/garrus/configuration.nix > garrus.nix; sudo mv -f garrus.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#garrus From 9e353184de88445bba41b26d6fdcfc221e70db31 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 30 Jan 2024 17:43:17 +0000 Subject: [PATCH 035/103] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 33eeee7..72c4abd 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ At the core of this installer it does the following: - Partition the drive of your choice - Installs a base of NixOS (`configuration.nix`) -- Installs a DE/WM of your choice (currently supporting GNOME, Plasma, Pantheon and Sway) - Installs needed packages for certain hardware +- Installs home-manager, sets the home.nix file into /etc/nixos/ so that it is updated with the rest of the system nix files are from [this repo](https://gitlab.com/ahoneybun/nix-configs/) but that can be changed as needed. @@ -20,8 +20,8 @@ Tested on the following architectures: This sets the hashedPassword to my own so you will need to update it to match your own as well as the username. I created the hash with this command: -``` -sudo mkpasswd -m sha-512 +```bash +mkpasswd -m sha-512 ``` ## Get Started From c67b546b01a2c920e631e9ea1f1abc0858ae761f Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 30 Jan 2024 22:27:18 +0000 Subject: [PATCH 036/103] Update README.md --- README.md | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) diff --git a/README.md b/README.md index 72c4abd..3cdd96a 100644 --- a/README.md +++ b/README.md @@ -23,51 +23,3 @@ This sets the hashedPassword to my own so you will need to update it to match yo ```bash mkpasswd -m sha-512 ``` - -## Get Started - -Prerequisites: - -- Prepare an installation medium. -- Boot the live environment. -- Connect to internet. - -## Connect to internet - -```sh -> add_network -0 -> set_network 0 ssid "myhomenetwork" -OK -> set_network 0 psk "mypassword" -OK -> set_network 0 key_mgmt WPA-PSK -OK -> enable_network 0 -OK -``` - -https://nixos.org/manual/nixos/stable/index.html#sec-installation-booting-networking - -## Start the installer - -```sh -sh <(curl -L https://gitlab.com/ahoneybun/nyxi-installer/-/raw/main/install.sh) -``` - -The following will happen: - -- Clear partition table for `/dev/***`. -- Creates a GPT partition table for `/dev/***`. -- Creates a 1GB EFI partiton at `/dev/***1`. -- Creates a 4GB Swap partition at `/dev/***3`. -- Creates a root partition with the rest of the space at `/dev/***2`. -- Installs systemd-boot - -## Roadmap - -- [x] Merge ARM64 and x86_64 together into one branch - -# Possible Ideas - -- [ ] Install nix-channels such as `nixos-hardware` and `home-manager` after install. From 46517ae8c8a6e1fa32a21005dcb894ca85053454 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 30 Jan 2024 16:01:24 -0700 Subject: [PATCH 037/103] add shepard to options --- install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install.sh b/install.sh index 35804a3..ef97258 100644 --- a/install.sh +++ b/install.sh @@ -43,6 +43,7 @@ Which device are you installing to? 2) HP Dev One 3) Thelio B1 (NVIDIA) 4) Galago Pro 3b (Garrus) + 5) Nebula49 (Shepard) 0) Generic EOF read deviceChoice @@ -65,6 +66,11 @@ elif [ $deviceChoice = 4 ]; 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#garrus +elif [ $deviceChoice = 5 ]; then + curl https://gitlab.com/ahoneybun/nix-configs/-/rawmain/systems/x86_64/shepard/configuration.nix > shepard.nix; sudo mv -f shepard.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#shepard + elif [ $deviceChoice = 0 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ sudo nixos-install --flake /mnt/etc/nixos#nixos From 8e91b6cc041be2c5fda93de8a5db8fadf3e14d27 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 30 Jan 2024 23:54:24 +0000 Subject: [PATCH 038/103] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index ef97258..7a32d8e 100644 --- a/install.sh +++ b/install.sh @@ -67,7 +67,7 @@ elif [ $deviceChoice = 4 ]; then sudo nixos-install --flake /mnt/etc/nixos#garrus elif [ $deviceChoice = 5 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/rawmain/systems/x86_64/shepard/configuration.nix > shepard.nix; sudo mv -f shepard.nix /mnt/etc/nixos/ + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/x86_64/shepard/configuration.nix > shepard.nix; sudo mv -f shepard.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#shepard From eea3b738ec76f6dfbda1aac6d3306c8c94a4af2a Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Wed, 31 Jan 2024 08:02:31 -0700 Subject: [PATCH 039/103] change: use hosts instead of systems --- install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 7a32d8e..3fb8a75 100644 --- a/install.sh +++ b/install.sh @@ -49,7 +49,7 @@ EOF read deviceChoice if [ $deviceChoice = 1 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/vm.nix > vm.nix; sudo mv -f vm.nix /mnt/etc/nixos/ + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/vm.nix > vm.nix; sudo mv -f vm.nix /mnt/etc/nixos/ sudo nixos-install --flake /mnt/etc/nixos#vm elif [ $deviceChoice = 2 ]; then @@ -57,17 +57,17 @@ elif [ $deviceChoice = 2 ]; then sudo nixos-install --flake /mnt/etc/nixos#dev-one elif [ $deviceChoice = 3 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/x86_64/thelio-nvidia.nix > thelio-nvidia.nix; sudo mv -f thelio-nvidia.nix /mnt/etc/nixos/ + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/thelio-nvidia.nix > thelio-nvidia.nix; sudo mv -f thelio-nvidia.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#thelio-b1 elif [ $deviceChoice = 4 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/x86_64/garrus/configuration.nix > garrus.nix; sudo mv -f garrus.nix /mnt/etc/nixos/ + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/garrus/configuration.nix > garrus.nix; sudo mv -f garrus.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#garrus elif [ $deviceChoice = 5 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/x86_64/shepard/configuration.nix > shepard.nix; sudo mv -f shepard.nix /mnt/etc/nixos/ + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/shepard/configuration.nix > shepard.nix; sudo mv -f shepard.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#shepard From 2704e92aea763b37806ad68dc0f0c5d3ed043e0b Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 1 Feb 2024 10:32:34 -0700 Subject: [PATCH 040/103] 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/ From beb42a25e9cd569f1b6339b202471ffb7c664303 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 1 Feb 2024 23:58:29 +0000 Subject: [PATCH 041/103] add omen and reorder hosts --- install.sh | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/install.sh b/install.sh index 402790e..38c67c4 100644 --- a/install.sh +++ b/install.sh @@ -41,37 +41,43 @@ cat << EOF Which device are you installing to? 1) Virtual Machine 2) HP Dev One - 3) Thelio B1 (NVIDIA) - 4) Galago Pro 3b (Garrus) - 5) Nebula49 (Shepard) + 3) HP Omen + 4) Thelio B1 (NVIDIA) + 5) Galago Pro 3b (Garrus) + 6) Nebula49 (Shepard) 0) Generic EOF -read deviceChoice +read hostChoice -if [ $deviceChoice = 1 ]; then +if [ $hostChoice = 1 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/vm.nix > vm.nix; sudo mv -f vm.nix /mnt/etc/nixos/ sudo nixos-install --flake /mnt/etc/nixos#vm -elif [ $deviceChoice = 2 ]; then +elif [ $hostChoice = 2 ]; 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#dev-one -elif [ $deviceChoice = 3 ]; then +elif [ $hostChoice = 3 ]; then + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/hp-omen.nix > hp-omen.nix; sudo mv -f hp-omen.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#omen + +elif [ $hostChoice = 4 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/thelio-nvidia.nix > thelio-nvidia.nix; sudo mv -f thelio-nvidia.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#thelio-b1 -elif [ $deviceChoice = 4 ]; then +elif [ $hostChoice = 5 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/garrus/configuration.nix > garrus.nix; sudo mv -f garrus.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#garrus -elif [ $deviceChoice = 5 ]; then +elif [ $hostChoice = 6 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/shepard/configuration.nix > shepard.nix; sudo mv -f shepard.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#shepard -elif [ $deviceChoice = 0 ]; then +elif [ $hostChoice = 0 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ sudo nixos-install --flake /mnt/etc/nixos#nixos From e6006b70ec3d62250edf73b1063691fd6884723b Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Fri, 9 Feb 2024 06:53:38 -0700 Subject: [PATCH 042/103] add: Jaal --- install.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/install.sh b/install.sh index 38c67c4..888f70d 100644 --- a/install.sh +++ b/install.sh @@ -30,7 +30,7 @@ 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 -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/add-nixos-hardware/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/ @@ -41,9 +41,9 @@ cat << EOF Which device are you installing to? 1) Virtual Machine 2) HP Dev One - 3) HP Omen - 4) Thelio B1 (NVIDIA) - 5) Galago Pro 3b (Garrus) + 3) Thelio B1 (NVIDIA) + 4) Galago Pro 3b (Garrus) + 5) Pinebook Pro (Jaal) 6) Nebula49 (Shepard) 0) Generic EOF @@ -58,19 +58,19 @@ elif [ $hostChoice = 2 ]; then sudo nixos-install --flake /mnt/etc/nixos#dev-one elif [ $hostChoice = 3 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/hp-omen.nix > hp-omen.nix; sudo mv -f hp-omen.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#omen - -elif [ $hostChoice = 4 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/thelio-nvidia.nix > thelio-nvidia.nix; sudo mv -f thelio-nvidia.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#thelio-b1 -elif [ $hostChoice = 5 ]; then +elif [ $hostChoice = 4 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/garrus/configuration.nix > garrus.nix; sudo mv -f garrus.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#garrus + +elif [ $hostChoice = 5 ]; then + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/aarch64/jaal/pinebook-pro.nix > jaal.nix; sudo mv -f jaal.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#jaal elif [ $hostChoice = 6 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/shepard/configuration.nix > shepard.nix; sudo mv -f shepard.nix /mnt/etc/nixos/ From 4720940db1cd89c13b2d1062eb78ab8b31b7e452 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Fri, 9 Feb 2024 07:56:12 -0700 Subject: [PATCH 043/103] fix: update links for correct branch for jaal testing --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 888f70d..fd6ca93 100644 --- a/install.sh +++ b/install.sh @@ -31,8 +31,8 @@ sudo mv /tmp/disko-config.nix /mnt/etc/nixos ## Downloads and places the predefinded generic flake to use curl https://gitlab.com/ahoneybun/nix-configs/-/raw/add-nixos-hardware/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/ +curl https://gitlab.com/ahoneybun/nix-configs/-/raw/add-nixos-hardware/configuration.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ +curl https://gitlab.com/ahoneybun/nix-configs/-/raw/add-nixos-hardware/home.nix > home.nix; sudo mv -f home.nix /mnt/etc/nixos/ # Step 3: Choosing a predefined system flake file to use @@ -68,7 +68,7 @@ elif [ $hostChoice = 4 ]; then sudo nixos-install --flake /mnt/etc/nixos#garrus elif [ $hostChoice = 5 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/aarch64/jaal/pinebook-pro.nix > jaal.nix; sudo mv -f jaal.nix /mnt/etc/nixos/ + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/add-nixos-hardware/hosts/aarch64/jaal/pinebook-pro.nix > jaal.nix; sudo mv -f jaal.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#jaal From cfa9051d9eab33f22c0ba9f178fd22dd383fa918 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Fri, 9 Feb 2024 08:33:12 -0700 Subject: [PATCH 044/103] change: rename pinebook-pro file --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index fd6ca93..ccb334c 100644 --- a/install.sh +++ b/install.sh @@ -68,7 +68,7 @@ elif [ $hostChoice = 4 ]; then sudo nixos-install --flake /mnt/etc/nixos#garrus elif [ $hostChoice = 5 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/add-nixos-hardware/hosts/aarch64/jaal/pinebook-pro.nix > jaal.nix; sudo mv -f jaal.nix /mnt/etc/nixos/ + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/add-nixos-hardware/hosts/aarch64/jaal/configuration.nix > jaal.nix; sudo mv -f jaal.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#jaal From 0cce412a56ee0ea5e7404847274f0a234ddd462b Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Fri, 9 Feb 2024 08:37:03 -0700 Subject: [PATCH 045/103] match the installer --- install.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index ccb334c..7c10dac 100644 --- a/install.sh +++ b/install.sh @@ -30,9 +30,9 @@ 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 -curl https://gitlab.com/ahoneybun/nix-configs/-/raw/add-nixos-hardware/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ -curl https://gitlab.com/ahoneybun/nix-configs/-/raw/add-nixos-hardware/configuration.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ -curl https://gitlab.com/ahoneybun/nix-configs/-/raw/add-nixos-hardware/home.nix > home.nix; sudo mv -f home.nix /mnt/etc/nixos/ +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/ # Step 3: Choosing a predefined system flake file to use @@ -68,7 +68,7 @@ elif [ $hostChoice = 4 ]; then sudo nixos-install --flake /mnt/etc/nixos#garrus elif [ $hostChoice = 5 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/add-nixos-hardware/hosts/aarch64/jaal/configuration.nix > jaal.nix; sudo mv -f jaal.nix /mnt/etc/nixos/ + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/aarch64/jaal/configuration.nix > jaal.nix; sudo mv -f jaal.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#jaal @@ -78,7 +78,7 @@ elif [ $hostChoice = 6 ]; then sudo nixos-install --flake /mnt/etc/nixos#shepard elif [ $hostChoice = 0 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ + 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 fi From 92c6e47c1924b73e9369f923a3492c423dcb1ea7 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Fri, 9 Feb 2024 16:15:08 -0700 Subject: [PATCH 046/103] update README --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3cdd96a..35c6370 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,10 @@ This installer is named after my doggo Onyxia. At the core of this installer it does the following: -- Partition the drive of your choice +- Partition the drive of your choice using Disko +- Uses `flake.nix` to set certain modules depending on the system like nixos-hardware for the Pinebook Pro + - Uses home-manager to manage settings for GNOME (current desktop) and other applications for my user - Installs a base of NixOS (`configuration.nix`) -- Installs needed packages for certain hardware -- Installs home-manager, sets the home.nix file into /etc/nixos/ so that it is updated with the rest of the system nix files are from [this repo](https://gitlab.com/ahoneybun/nix-configs/) but that can be changed as needed. From b09dbc091b66fcd00110e7cd4eedb66a5ad1fbf3 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 13 Feb 2024 06:49:17 -0700 Subject: [PATCH 047/103] remove: work systems like Thelio and HP Dev One --- install.sh | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/install.sh b/install.sh index 7c10dac..1da3278 100644 --- a/install.sh +++ b/install.sh @@ -40,11 +40,9 @@ cat << EOF Which device are you installing to? 1) Virtual Machine - 2) HP Dev One - 3) Thelio B1 (NVIDIA) - 4) Galago Pro 3b (Garrus) - 5) Pinebook Pro (Jaal) - 6) Nebula49 (Shepard) + 2) Galago Pro 3b (Garrus) + 3) Pinebook Pro (Jaal) + 4) Nebula49 (Shepard) 0) Generic EOF read hostChoice @@ -54,25 +52,16 @@ if [ $hostChoice = 1 ]; then sudo nixos-install --flake /mnt/etc/nixos#vm elif [ $hostChoice = 2 ]; 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#dev-one - -elif [ $hostChoice = 3 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/thelio-nvidia.nix > thelio-nvidia.nix; sudo mv -f thelio-nvidia.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#thelio-b1 - -elif [ $hostChoice = 4 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/garrus/configuration.nix > garrus.nix; sudo mv -f garrus.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#garrus -elif [ $hostChoice = 5 ]; then +elif [ $hostChoice = 3 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/aarch64/jaal/configuration.nix > jaal.nix; sudo mv -f jaal.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#jaal -elif [ $hostChoice = 6 ]; then +elif [ $hostChoice = 4 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/shepard/configuration.nix > shepard.nix; sudo mv -f shepard.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#shepard From 1704dd58a77acfed8226532b8d2eb8fd0b835a0a Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 15 Feb 2024 16:35:26 -0700 Subject: [PATCH 048/103] add: EDI --- install.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/install.sh b/install.sh index 1da3278..fe5c389 100644 --- a/install.sh +++ b/install.sh @@ -43,6 +43,7 @@ Which device are you installing to? 2) Galago Pro 3b (Garrus) 3) Pinebook Pro (Jaal) 4) Nebula49 (Shepard) + 5) local Build Server (EDI) 0) Generic EOF read hostChoice @@ -66,6 +67,10 @@ elif [ $hostChoice = 4 ]; 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 = 5 ]; 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 3037df6b3e6050d00226d04ccec3f649e63aa8f2 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 15 Feb 2024 17:02:05 -0700 Subject: [PATCH 049/103] change: edi -> EDI --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index fe5c389..f3aa48b 100644 --- a/install.sh +++ b/install.sh @@ -69,7 +69,7 @@ elif [ $hostChoice = 4 ]; then elif [ $hostChoice = 5 ]; 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 + 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/ From cec220bb71a30290fbd0a137d963d092a7ea888e Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 22 Feb 2024 18:10:29 +0000 Subject: [PATCH 050/103] Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 35c6370..4a67414 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,12 @@ This installer is named after my doggo Onyxia. +## Starting the Installer + +```bash +sh <(curl -L https://gitlab.com/ahoneybun/nyxi-installer/-/raw/main/install.sh) +``` + At the core of this installer it does the following: - Partition the drive of your choice using Disko From cbe6bcc93e37b79f28ec5e17b27de05fffb04ced Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 22 Feb 2024 18:14:15 +0000 Subject: [PATCH 051/103] Nebula49 -> nebula49 --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index f3aa48b..373f518 100644 --- a/install.sh +++ b/install.sh @@ -42,7 +42,7 @@ Which device are you installing to? 1) Virtual Machine 2) Galago Pro 3b (Garrus) 3) Pinebook Pro (Jaal) - 4) Nebula49 (Shepard) + 4) nebula49 (Shepard) 5) local Build Server (EDI) 0) Generic EOF From 85087fe3580b41bb43c359d97e21660a3398e361 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 29 Feb 2024 16:28:38 +0000 Subject: [PATCH 052/103] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 373f518..95984e5 100644 --- a/install.sh +++ b/install.sh @@ -43,7 +43,7 @@ Which device are you installing to? 2) Galago Pro 3b (Garrus) 3) Pinebook Pro (Jaal) 4) nebula49 (Shepard) - 5) local Build Server (EDI) + 5) Homelab (EDI) 0) Generic EOF read hostChoice From d89f6afc214e05fdecbe6e1723c90cc8768a066c Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Fri, 1 Mar 2024 22:21:32 +0000 Subject: [PATCH 053/103] add: macbook --- install.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/install.sh b/install.sh index 95984e5..f30fbb7 100644 --- a/install.sh +++ b/install.sh @@ -71,6 +71,11 @@ elif [ $hostChoice = 5 ]; 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 = 6 ]; then + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/macbook-intel.nix > shepard.nix; sudo mv -f shepard.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#macbook + 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 b3825d935bafc2c3e1dcfb3af857074e875a48b5 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 25 Jun 2024 16:03:46 -0600 Subject: [PATCH 054/103] start work on move to 24.05 --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index f30fbb7..04d4ec2 100644 --- a/install.sh +++ b/install.sh @@ -31,8 +31,8 @@ sudo mv /tmp/disko-config.nix /mnt/etc/nixos ## 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/ +curl https://gitlab.com/ahoneybun/nix-configs/-/raw/release-24.05/configuration.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ +curl https://gitlab.com/ahoneybun/nix-configs/-/raw/release-24.05/home.nix > home.nix; sudo mv -f home.nix /mnt/etc/nixos/ # Step 3: Choosing a predefined system flake file to use From 56369f0679f6bb12e66683c4833d5e924c48c690 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Fri, 9 Aug 2024 11:30:34 -0600 Subject: [PATCH 055/103] Point to main now and remove unsupported devices --- install.sh | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/install.sh b/install.sh index 04d4ec2..393656f 100644 --- a/install.sh +++ b/install.sh @@ -31,8 +31,8 @@ sudo mv /tmp/disko-config.nix /mnt/etc/nixos ## 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/release-24.05/configuration.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ -curl https://gitlab.com/ahoneybun/nix-configs/-/raw/release-24.05/home.nix > home.nix; sudo mv -f home.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/ # Step 3: Choosing a predefined system flake file to use @@ -43,7 +43,6 @@ Which device are you installing to? 2) Galago Pro 3b (Garrus) 3) Pinebook Pro (Jaal) 4) nebula49 (Shepard) - 5) Homelab (EDI) 0) Generic EOF read hostChoice @@ -56,7 +55,7 @@ elif [ $hostChoice = 2 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/garrus/configuration.nix > garrus.nix; sudo mv -f garrus.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#garrus - + elif [ $hostChoice = 3 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/aarch64/jaal/configuration.nix > jaal.nix; sudo mv -f jaal.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/ @@ -67,15 +66,6 @@ elif [ $hostChoice = 4 ]; 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 = 5 ]; 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 = 6 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/macbook-intel.nix > shepard.nix; sudo mv -f shepard.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#macbook - 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 c02b8f0ca3a882ab58aa0386207076ceaff65b33 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 5 Sep 2024 14:09:33 +0000 Subject: [PATCH 056/103] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 393656f..37f76c5 100644 --- a/install.sh +++ b/install.sh @@ -40,7 +40,7 @@ cat << EOF Which device are you installing to? 1) Virtual Machine - 2) Galago Pro 3b (Garrus) + 2) Galago Pro 5 (Garrus) 3) Pinebook Pro (Jaal) 4) nebula49 (Shepard) 0) Generic From 0f1f29e716f0da0025eefabc32520f14220fee57 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 9 Sep 2024 17:24:20 -0600 Subject: [PATCH 057/103] Remove jaal (pinebook-pro) --- install.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/install.sh b/install.sh index 37f76c5..a516724 100644 --- a/install.sh +++ b/install.sh @@ -41,8 +41,7 @@ cat << EOF Which device are you installing to? 1) Virtual Machine 2) Galago Pro 5 (Garrus) - 3) Pinebook Pro (Jaal) - 4) nebula49 (Shepard) + 3) nebula49 (Shepard) 0) Generic EOF read hostChoice @@ -57,11 +56,6 @@ elif [ $hostChoice = 2 ]; then sudo nixos-install --flake /mnt/etc/nixos#garrus elif [ $hostChoice = 3 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/aarch64/jaal/configuration.nix > jaal.nix; sudo mv -f jaal.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#jaal - -elif [ $hostChoice = 4 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/shepard/configuration.nix > shepard.nix; sudo mv -f shepard.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#shepard From b6bd57a20fed7c22cd69a0bb7e451eee677ee13c Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 19 Sep 2024 19:18:01 -0600 Subject: [PATCH 058/103] fix vm path --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index a516724..162ae23 100644 --- a/install.sh +++ b/install.sh @@ -47,7 +47,7 @@ EOF read hostChoice if [ $hostChoice = 1 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/vm.nix > vm.nix; sudo mv -f vm.nix /mnt/etc/nixos/ + 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 elif [ $hostChoice = 2 ]; then From 7730df30af073e7173b0c74e0270db90e04723e2 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 15 Oct 2024 19:56:19 +0000 Subject: [PATCH 059/103] add drack --- install.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 162ae23..a8c0371 100644 --- a/install.sh +++ b/install.sh @@ -41,7 +41,8 @@ cat << EOF Which device are you installing to? 1) Virtual Machine 2) Galago Pro 5 (Garrus) - 3) nebula49 (Shepard) + 3) Thinkpad X13s (Drack) + 4) nebula49 (Shepard) 0) Generic EOF read hostChoice @@ -56,6 +57,10 @@ elif [ $hostChoice = 2 ]; then sudo nixos-install --flake /mnt/etc/nixos#garrus elif [ $hostChoice = 3 ]; then + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/aarch64/drack/configuration.nix > drack.nix; sudo mv -f drack.nix /mnt/etc/nixos/ + sudo nixos-install --flake /mnt/etc/nixos#drack + +elif [ $hostChoice = 4 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/shepard/configuration.nix > shepard.nix; sudo mv -f shepard.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#shepard From 0db2dedde109f3a9e037e71fad105036f54f05b9 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 15 Oct 2024 21:33:15 +0000 Subject: [PATCH 060/103] Update install.sh --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index a8c0371..aaea823 100644 --- a/install.sh +++ b/install.sh @@ -58,6 +58,7 @@ elif [ $hostChoice = 2 ]; then elif [ $hostChoice = 3 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/aarch64/drack/configuration.nix > drack.nix; sudo mv -f drack.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#drack elif [ $hostChoice = 4 ]; then From 816765472726fd269ef095423f5392c1994d8d67 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Fri, 25 Oct 2024 22:18:55 +0000 Subject: [PATCH 061/103] add EDI back --- install.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/install.sh b/install.sh index aaea823..f266c0d 100644 --- a/install.sh +++ b/install.sh @@ -66,6 +66,10 @@ elif [ $hostChoice = 4 ]; 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 = 5 ]; 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 6c0a6cc602079217378c5055849a60d9654a416d Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Fri, 25 Oct 2024 22:19:29 +0000 Subject: [PATCH 062/103] finish adding EDI --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index f266c0d..9b348a7 100644 --- a/install.sh +++ b/install.sh @@ -43,6 +43,7 @@ Which device are you installing to? 2) Galago Pro 5 (Garrus) 3) Thinkpad X13s (Drack) 4) nebula49 (Shepard) + 5) Home Server (EDI) 0) Generic EOF read hostChoice From 7541a7a9ad76db0b2a6432ab2d7994e636b7d20c Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Fri, 1 Nov 2024 15:55:41 -0600 Subject: [PATCH 063/103] fix typo --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 9b348a7..e4d9eec 100644 --- a/install.sh +++ b/install.sh @@ -43,7 +43,7 @@ Which device are you installing to? 2) Galago Pro 5 (Garrus) 3) Thinkpad X13s (Drack) 4) nebula49 (Shepard) - 5) Home Server (EDI) + 5) Home Server (EDI) - Do Not Use 0) Generic EOF read hostChoice @@ -68,7 +68,7 @@ elif [ $hostChoice = 4 ]; then sudo nixos-install --flake /mnt/etc/nixos#shepard elif [ $hostChoice = 5 ]; 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/ + 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 From bb2f3f53d3b209fa3268d0200747bf006c18d87e Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 4 Nov 2024 15:39:14 -0700 Subject: [PATCH 064/103] Rename EDI to edi --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index e4d9eec..0c8851f 100644 --- a/install.sh +++ b/install.sh @@ -68,7 +68,7 @@ elif [ $hostChoice = 4 ]; then sudo nixos-install --flake /mnt/etc/nixos#shepard elif [ $hostChoice = 5 ]; 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/ + 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 From 99683499bf10ae4dd36d3c9df3b84c485b3b7c88 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 7 Jan 2025 14:28:19 +0000 Subject: [PATCH 065/103] add lemp13 --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 0c8851f..3b1fcd8 100644 --- a/install.sh +++ b/install.sh @@ -41,7 +41,7 @@ cat << EOF Which device are you installing to? 1) Virtual Machine 2) Galago Pro 5 (Garrus) - 3) Thinkpad X13s (Drack) + 3) Lemur Pro 13 4) nebula49 (Shepard) 5) Home Server (EDI) - Do Not Use 0) Generic @@ -58,9 +58,9 @@ elif [ $hostChoice = 2 ]; then sudo nixos-install --flake /mnt/etc/nixos#garrus elif [ $hostChoice = 3 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/aarch64/drack/configuration.nix > drack.nix; sudo mv -f drack.nix /mnt/etc/nixos/ + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/lemp13.nix > lemp13.nix; sudo mv -f lemp13.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#drack + sudo nixos-install --flake /mnt/etc/nixos#lemp13 elif [ $hostChoice = 4 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/shepard/configuration.nix > shepard.nix; sudo mv -f shepard.nix /mnt/etc/nixos/ From ebd81d3780ff1b01c9080e1652036f220bfbb041 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 27 Jan 2025 12:26:36 -0700 Subject: [PATCH 066/103] swap lemp13 for garrus --- install.sh | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/install.sh b/install.sh index 3b1fcd8..406cc1f 100644 --- a/install.sh +++ b/install.sh @@ -40,10 +40,9 @@ cat << EOF Which device are you installing to? 1) Virtual Machine - 2) Galago Pro 5 (Garrus) - 3) Lemur Pro 13 - 4) nebula49 (Shepard) - 5) Home Server (EDI) - Do Not Use + 2) Lemur Pro 13 (Garrus) + 3) nebula49 (Shepard) + 4) Home Server (EDI) - Do Not Use 0) Generic EOF read hostChoice @@ -57,11 +56,6 @@ elif [ $hostChoice = 2 ]; 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#garrus -elif [ $hostChoice = 3 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/lemp13.nix > lemp13.nix; sudo mv -f lemp13.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#lemp13 - elif [ $hostChoice = 4 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/shepard/configuration.nix > shepard.nix; sudo mv -f shepard.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/ From 0e9001e6bf8a91455e2bc5dbf7a945674dbeddbd Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sun, 16 Feb 2025 06:14:50 +0000 Subject: [PATCH 067/103] fix numbering for the list --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 406cc1f..dcd1a11 100644 --- a/install.sh +++ b/install.sh @@ -56,12 +56,12 @@ elif [ $hostChoice = 2 ]; 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#garrus -elif [ $hostChoice = 4 ]; then +elif [ $hostChoice = 3 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/shepard/configuration.nix > shepard.nix; sudo mv -f shepard.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#shepard -elif [ $hostChoice = 5 ]; then +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 From 31cce1d9988384e98843eb7e7f62cbc28de009d9 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 17 Feb 2025 20:01:04 +0000 Subject: [PATCH 068/103] Edit install.sh --- install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install.sh b/install.sh index dcd1a11..5650cb2 100644 --- a/install.sh +++ b/install.sh @@ -31,6 +31,8 @@ sudo mv /tmp/disko-config.nix /mnt/etc/nixos ## 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/ + +## Downloads and places the predefinded generic configuration and home files to use 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/ From 6c8f35c39f110ba12276bf5e44ebaf8bc2fc7a85 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 18 Feb 2025 20:02:01 +0000 Subject: [PATCH 069/103] Interface --- install.sh | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/install.sh b/install.sh index 5650cb2..869e7a2 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. @@ -11,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 drive choice: " driveName +echo "" ## Download Disko file cd /tmp @@ -23,12 +22,17 @@ 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/disko-config.nix --yes-wipe-all-disks ## 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 +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/ @@ -44,13 +48,15 @@ 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 -read hostChoice + +echo "" +read -p "Enter your device 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 @@ -63,12 +69,9 @@ 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/ + 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 743ca7f3dd167e29f7786af4e1d6af863aab7213 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 18 Feb 2025 20:02:40 +0000 Subject: [PATCH 070/103] removes debugging lsblk command --- install.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/install.sh b/install.sh index 869e7a2..e7a2c5f 100644 --- a/install.sh +++ b/install.sh @@ -30,9 +30,6 @@ 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 -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/ From 14b8ada912cbc1389db1ea10ed4ab530d7b947be Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Wed, 12 Mar 2025 15:39:08 -0600 Subject: [PATCH 071/103] add Pixel Slate to installer --- install.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index e7a2c5f..e2810a1 100644 --- a/install.sh +++ b/install.sh @@ -44,7 +44,8 @@ cat << EOF Which device are you installing to? 1) Virtual Machine 2) Lemur Pro 13 (Garrus) - 3) nebula49 (Shepard) + 3) Pixel Slate + 4) nebula49 (Shepard) 0) Generic EOF @@ -62,6 +63,11 @@ elif [ $hostChoice = 2 ]; then sudo nixos-install --flake /mnt/etc/nixos#garrus elif [ $hostChoice = 3 ]; then + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/pixel-slate.nix > pixel-slate.nix; sudo mv -f pixel-slate.nix /mnt/etc/nixos/ + #curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/desktops/lomiri.nix > gnome.nix; sudo mv -f gnome.nix /mnt/etc/nixos/ + sudo nixos-install --flake /mnt/etc/nixos#pixel-slate + +elif [ $hostChoice = 4 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/shepard/configuration.nix > shepard.nix; sudo mv -f shepard.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#shepard From aebb38df6149f702d55f2f55256eb6d9ad5095a5 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Wed, 23 Apr 2025 18:39:19 -0600 Subject: [PATCH 072/103] =?UTF-8?q?First=20Rust=20rewrite=20release!=20?= =?UTF-8?q?=F0=9F=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 8 + Cargo.lock | 758 ++++++++++++++++++++++++++++++++++++++++++++ Cargo.toml | 10 + README.md | 36 ++- docs/development.md | 47 +++ flake.lock | 96 ++++++ flake.nix | 40 +++ shell.nix | 29 ++ src/main.rs | 380 ++++++++++++++++++++++ 9 files changed, 1389 insertions(+), 15 deletions(-) create mode 100644 .gitignore create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 docs/development.md create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 shell.nix create mode 100644 src/main.rs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d1ff78e --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +# Rust/Carge +/target + +# Nix +result + +# Main nix files +/data diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..5a5e4e6 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,758 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "bindgen" +version = "0.66.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b84e06fc203107bfbad243f4aba2af864eb7db3b1cf46ea0a023b0b433d2a7" +dependencies = [ + "bitflags", + "cexpr", + "clang-sys", + "lazy_static", + "lazycell", + "log", + "peeking_take_while", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn 2.0.100", + "which", +] + +[[package]] +name = "bitflags" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" + +[[package]] +name = "cc" +version = "1.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fcb57c740ae1daf453ae85f16e37396f672b039e00d9d866e07ddb24e328e3a" +dependencies = [ + "shlex", +] + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "curl" +version = "0.4.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9fb4d13a1be2b58f14d60adba57c9834b78c62fd86c3e76a148f732686e9265" +dependencies = [ + "curl-sys", + "libc", + "openssl-probe", + "openssl-sys", + "schannel", + "socket2", + "windows-sys 0.52.0", +] + +[[package]] +name = "curl-sys" +version = "0.4.80+curl-8.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55f7df2eac63200c3ab25bde3b2268ef2ee56af3d238e76d61f01c3c49bff734" +dependencies = [ + "cc", + "libc", + "libz-sys", + "openssl-sys", + "pkg-config", + "vcpkg", + "windows-sys 0.52.0", +] + +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" + +[[package]] +name = "embed-doc-image" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af36f591236d9d822425cb6896595658fa558fcebf5ee8accac1d4b92c47166e" +dependencies = [ + "base64", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "enum-iterator" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c280b9e6b3ae19e152d8e31cf47f18389781e119d4013a2a2bb0180e5facc635" +dependencies = [ + "enum-iterator-derive", +] + +[[package]] +name = "enum-iterator-derive" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + +[[package]] +name = "glob" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" + +[[package]] +name = "hashbrown" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" + +[[package]] +name = "home" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "indexmap" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "io-kit-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b2d4429acc1deff0fbdece0325b4997bdb02b2c245ab7023fd5deca0f6348de" +dependencies = [ + "core-foundation-sys", + "mach2", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + +[[package]] +name = "libc" +version = "0.2.171" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" + +[[package]] +name = "libloading" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" +dependencies = [ + "cfg-if", + "windows-targets", +] + +[[package]] +name = "libz-sys" +version = "1.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b70e7a7df205e92a1a4cd9aaae7898dac0aa555503cc0a649494d0d60e7651d" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "log" +version = "0.4.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e" + +[[package]] +name = "mach" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" +dependencies = [ + "libc", +] + +[[package]] +name = "mach2" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b955cdeb2a02b9117f121ce63aa52d08ade45de53e48fe6a38b39c10f6f709" +dependencies = [ + "libc", +] + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "nix" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" +dependencies = [ + "bitflags", + "cfg-if", + "cfg_aliases", + "libc", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "num_enum" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[package]] +name = "nyxi-installer" +version = "2.0.0" +dependencies = [ + "curl", + "nix", + "rsfdisk", + "sys_metrics", +] + +[[package]] +name = "once_cell" +version = "1.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d75b0bedcc4fe52caa0e03d9f1151a323e4aa5e2d78ba3580400cd3c9e2bc4bc" + +[[package]] +name = "openssl-probe" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" + +[[package]] +name = "openssl-sys" +version = "0.9.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8288979acd84749c744a9014b4382d42b8f7b2592847b5afb2ed29e5d16ede07" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "peeking_take_while" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" + +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "prettyplease" +version = "0.2.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5316f57387668042f561aae71480de936257848f9c43ce528e311d89a07cadeb" +dependencies = [ + "proc-macro2", + "syn 2.0.100", +] + +[[package]] +name = "proc-macro-crate" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro2" +version = "1.0.94" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "regex" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "rsfdisk" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b3cacc1af2ca434035b8c885b1ef4d64a663581df95134653feba07fccae0c" +dependencies = [ + "embed-doc-image", + "enum-iterator", + "libc", + "log", + "num_enum", + "once_cell", + "pkg-config", + "rsfdisk-sys", + "thiserror", + "typed-builder", +] + +[[package]] +name = "rsfdisk-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39b186475d9df76290bba3de5196eeed64b95e77861095ea8b244f962f47575" +dependencies = [ + "bindgen", + "cc", + "pkg-config", +] + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustix" +version = "0.38.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.59.0", +] + +[[package]] +name = "schannel" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "serde" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "socket2" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f5fd57c80058a56cf5c777ab8a126398ece8e442983605d280a44ce79d0edef" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sys_metrics" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9b266b80f59f86e2e1e0a4938e316e32c3730d94a749f236305152279f77484" +dependencies = [ + "core-foundation-sys", + "glob", + "io-kit-sys", + "lazy_static", + "libc", + "mach", + "serde", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[package]] +name = "toml_datetime" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" + +[[package]] +name = "toml_edit" +version = "0.22.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow", +] + +[[package]] +name = "typed-builder" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd9d30e3a08026c78f246b173243cf07b3696d274debd26680773b6773c2afc7" +dependencies = [ + "typed-builder-macro", +] + +[[package]] +name = "typed-builder-macro" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c36781cc0e46a83726d9879608e4cf6c2505237e263a8eb8c24502989cfdb28" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[package]] +name = "unicode-ident" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winnow" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e97b544156e9bebe1a0ffbc03484fc1ffe3100cbce3ffb17eac35f7cdd7ab36" +dependencies = [ + "memchr", +] diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..69aee11 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "nyxi-installer" +version = "2.0.0" +edition = "2021" + +[dependencies] +curl = "0.4.47" +nix = { version = "0.29.0", features = ["mount"] } +rsfdisk = "0.1.0" +sys_metrics = "0.2.7" diff --git a/README.md b/README.md index 4a67414..fd5496f 100644 --- a/README.md +++ b/README.md @@ -2,30 +2,36 @@ This installer is named after my doggo Onyxia. -## Starting the Installer - -```bash -sh <(curl -L https://gitlab.com/ahoneybun/nyxi-installer/-/raw/main/install.sh) -``` - At the core of this installer it does the following: -- Partition the drive of your choice using Disko +- Partition the drive of your choice using the `rsfdisk` crate. - Uses `flake.nix` to set certain modules depending on the system like nixos-hardware for the Pinebook Pro - - Uses home-manager to manage settings for GNOME (current desktop) and other applications for my user - Installs a base of NixOS (`configuration.nix`) nix files are from [this repo](https://gitlab.com/ahoneybun/nix-configs/) but that can be changed as needed. -Tested on the following drives: -- SATA -- NVMe - -Tested on the following architectures: -- x86_64 - This sets the hashedPassword to my own so you will need to update it to match your own as well as the username. I created the hash with this command: ```bash mkpasswd -m sha-512 ``` + +# Usage + +1. Boot from a live disk of NixOS (ideally the minimal image) +2. Connect to network +3. Download from the releases page using curl + +```bash +curl $PATH +``` + +## Older Bash installer + +```bash +sh <(curl -L https://gitlab.com/ahoneybun/nyxi-installer/-/raw/main/install.sh) +``` + +# Development + +![docs/development](https://gitlab.com/ahoneybun/nyxi-installer/-/blob/rust-rewrite/docs/development.md) diff --git a/docs/development.md b/docs/development.md new file mode 100644 index 0000000..5808ad7 --- /dev/null +++ b/docs/development.md @@ -0,0 +1,47 @@ +# Development + +## Clone the repository + +```bash +git clone https://gitlab.com/ahoneybun/nyxi-installer.git +``` + +## Enter the repository that you just cloned + +```bash +cd nyxi-installer +``` + +## Enter nix-shell + +This is if you are already running NixOS or using the `nix` packagemanager on your system where development will take place. This will install the needed system packages, set environment variables and such for development. + +```bash +nix-shell +``` + +## Flakes + +If you have flakes enabled you can use `nix develop` instead. + +```bash +nix develop +``` + +## Ubuntu + +Install these packages for developing using `apt`. + +```bash +sudo apt install build-essential pkg-config libcurl4-openssl-dev libfdisk-dev +``` + +## Building and testing + +You can use normal `cargo` commands like: + +- `cargo test` +- `cargo build` +- `cargo run` + +**NOTE:** you will need to build the program and run it with `sudo` currently so `cargo run` is not the best for testing. diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..1d51da6 --- /dev/null +++ b/flake.lock @@ -0,0 +1,96 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "naersk": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1743800763, + "narHash": "sha256-YFKV+fxEpMgP5VsUcM6Il28lI0NlpM7+oB1XxbBAYCw=", + "owner": "nix-community", + "repo": "naersk", + "rev": "ed0232117731a4c19d3ee93aa0c382a8fe754b01", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "naersk", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1744536153, + "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1744536153, + "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "naersk": "naersk", + "nixpkgs": "nixpkgs_2" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..b73e439 --- /dev/null +++ b/flake.nix @@ -0,0 +1,40 @@ +{ + description = "Flake to build and develop Nyxi"; + + inputs = { + flake-utils.url = "github:numtide/flake-utils"; + naersk.url = "github:nix-community/naersk"; + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + }; + + outputs = { self, flake-utils, naersk, nixpkgs }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = (import nixpkgs) { + inherit system; + }; + + naersk' = pkgs.callPackage naersk {}; + + # Setting variables that everything uses + LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib"; + CLANG_PATH = "${pkgs.llvmPackages.clang}/bin/clang"; + + in rec { + # For `nix build` & `nix run`: + defaultPackage = naersk'.buildPackage { + inherit LIBCLANG_PATH CLANG_PATH; + buildInputs = with pkgs; [ pkg-config openssl ]; + nativeBuildInputs = with pkgs; [ util-linux.dev ]; + src = ./.; + }; + + # For `nix develop` (optional, can be skipped): + devShell = pkgs.mkShell { + inherit LIBCLANG_PATH CLANG_PATH; + buildInputs = with pkgs; [ pkg-config openssl ]; + nativeBuildInputs = with pkgs; [ rustc cargo util-linux.dev ]; + }; + } + ); +} diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..7f9e443 --- /dev/null +++ b/shell.nix @@ -0,0 +1,29 @@ +{ pkgs ? import {} }: + + pkgs.mkShell { + buildInputs = with pkgs; [ + # Rust + cargo + rustc + + # Compiler + gnumake + clang + llvmPackages.libclang + llvmPackages.clang + + # System + btrfs-progs + e2fsprogs + openssl + pkg-config + util-linux + ]; + + shellHook = '' + export LIBCLANG_PATH="${pkgs.llvmPackages.libclang.lib}/lib" + export CLANG_PATH="${pkgs.llvmPackages.clang}/bin/clang" + export RUST_BACKTRACE=1 + echo "We're ready to make some Rust!" + ''; +} diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..4b9f9e9 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,380 @@ +use rsfdisk::core::partition::{Guid, Partition, PartitionKind}; +use rsfdisk::core::partition_table::PartitionTableKind; +use rsfdisk::fdisk::Fdisk; +use std::fs::File; +use std::io; +use std::io::Write; +use std::path::Path; +use std::process::{Command, Stdio}; +use sys_metrics::disks; + +use curl::easy::Easy; +use nix::mount::{mount, MsFlags}; + +fn format_drive(drive_name: &str) -> rsfdisk::Result<()> { + let mut disk = Fdisk::builder() + .assign_device(drive_name) + .enable_read_write() + .wipe_device_metadata() + .build()?; + + disk.partition_table_create(PartitionTableKind::GPT)?; + + let partition_type = PartitionKind::builder().guid(Guid::EfiSystem).build()?; + + let boot = Partition::builder() + .partition_type(partition_type) + .name("EFI") + //Assuming 512 bytes per sector, 2_097_152 sectors <=> 1 GiB. + .size_in_sectors(2_097_152) + .build()?; + + let _ = disk.partition_add(boot)?; + + let partition_type = PartitionKind::builder() + .guid(Guid::LinuxRootx86_64) + .build()?; + + let root = Partition::builder() + .partition_type(partition_type) + .name("Root") + .build()?; + + let _ = disk.partition_add(root)?; + + disk.partition_table_write_to_disk()?; + + Ok(()) +} + +fn format_partitions(drive_name: &str) { + let efi_path = format!("{}p1", drive_name); + let root_path = format!("{}p2", drive_name); + + let _efi_partition = Command::new("mkfs.fat") + .arg("-F32") + .arg("-n") + .arg("EFI") + .arg(&efi_path) + .output() + .expect("Failed to format boot partition as FAT32"); + + let _root_partition = Command::new("mkfs.ext4") + .arg(&root_path) + .output() + .expect("Failed to format root partition as ext4"); +} + +fn mount_partitions(drive_name: &str) { + let efi_path = format!("{}p1", drive_name); + let root_path = format!("{}p2", drive_name); + + let root_source = Some(Path::new(&root_path)); + let root_target = Path::new("/mnt"); + + mount( + root_source, + root_target, + Some("ext4"), + MsFlags::empty(), + None::<&[u8]>, + ) + .expect("Failed to mount root partition"); + + // Creates the boot directory in /mnt/boot + let _create_boot_directory = Command::new("mkdir") + .arg("-p") + .arg("/mnt/boot") + .output() + .expect("Failed to create boot directory"); + + let boot_source = Some(Path::new(&efi_path)); + let boot_target = Path::new("/mnt/boot"); + + let _mount_boot = Command::new("mount") + .args(["-t", "vfat"]) + .args(["-o", "umask=0077"]) + .arg(&efi_path) + .arg("/mnt/boot") + .output() + .expect("Failed to mount boot partition"); + + // mount( + // boot_source, + // boot_target, + // Some("vfat"), + // MsFlags::empty(), + // None::<&[u8]>, + // ) + // .expect("Failed to mount boot partition"); +} + +fn grab_flake() { + let mut easy = Easy::new(); + easy.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/flake.nix") + .unwrap(); + + let mut file = File::create("data/flake.nix").unwrap(); + + { + let mut transfer = easy.transfer(); + transfer + .write_function(|data| { + file.write_all(data).unwrap(); + Ok(data.len()) + }) + .unwrap(); + transfer.perform().unwrap(); + } +} + +fn grab_config() { + let mut easy = Easy::new(); + easy.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/configuration.nix") + .unwrap(); + + let mut file = File::create("data/configuration.nix").unwrap(); + + { + let mut transfer = easy.transfer(); + transfer + .write_function(|data| { + file.write_all(data).unwrap(); + Ok(data.len()) + }) + .unwrap(); + transfer.perform().unwrap(); + } +} + +fn grab_home() { + let mut easy = Easy::new(); + easy.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/home.nix") + .unwrap(); + + let mut file = File::create("data/home.nix").unwrap(); + + { + let mut transfer = easy.transfer(); + transfer + .write_function(|data| { + file.write_all(data).unwrap(); + Ok(data.len()) + }) + .unwrap(); + transfer.perform().unwrap(); + } +} + +fn grab_gnome() { + let mut gnome_config = Easy::new(); + gnome_config + .url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/desktops/gnome.nix") + .unwrap(); + + let mut config_file = File::create("data/gnome.nix").unwrap(); + + { + let mut transfer = gnome_config.transfer(); + transfer + .write_function(|data| { + config_file.write_all(data).unwrap(); + Ok(data.len()) + }) + .unwrap(); + transfer.perform().unwrap(); + } +} + +fn main() { + println!("--------------------------------------"); + println!("| Welcome to the Nyxi Installer 2.0! |"); + println!("--------------------------------------"); + println!(""); + + println!("Availble disks for installation:"); + println!("---------------------------------"); + println!(""); + + match disks::get_physical_ioblocks() { + Ok(disk_list) => { + for disk in disk_list { + println!("Disk: {}", disk.device_name); + } + } + Err(_e) => println!("{}", _e), + } + + let mut drive_name = String::new(); + + println!(""); + println!("Use the full drive path such as /dev/nvme0n1 or /dev/sda"); + println!(""); + println!( + "Which drive do we want to use for this installation?: {}", + drive_name + ); + + io::stdin() + .read_line(&mut drive_name) + .expect("Failed to read line"); + + let drive_name = drive_name.trim(); + + // Download nix files + grab_flake(); + grab_config(); + grab_home(); + grab_gnome(); + + // Partitioning the selected drive + let _ = format_drive(drive_name); + + // Formatting the partitions + format_partitions(drive_name); + + // Mounting the partitions + mount_partitions(drive_name); + + // Creates the init nix config in /mnt/etc/nixos + let _nixos_gen_config = Command::new("nixos-generate-config") + .arg("--root") + .arg("/mnt") + .output() + .expect("Failed to execute command"); + + // Copies the nix files to /mnt/etc/nixos/ + let _nix_move = Command::new("mv") + .args([ + "-f", + "data/flake.nix", + "data/configuration.nix", + "data/home.nix", + ]) + .arg("/mnt/etc/nixos") + .output() + .expect("Failed to move nix files over"); + + // Fixes a security issue with boot + let _boot_fix = Command::new("sed") + .arg("-i") + .arg( + r#"/fsType = "vfat"/ { + n + s/\(options = \[.*\)\]/\1"umask=0077 "]/ + }"#, + ) + .arg("/mnt/etc/nixos/hardware-configuration.nix") + .output() + .expect("Failed to apply boot fix"); + + // Host selection + loop { + println!(""); + println!("Host selection:"); + println!("---------------"); + println!(""); + println!("1. Lemur Pro 13 (Garrus)"); + println!("2. Virtual Machine"); + println!("3. Generic"); + println!(""); + + println!("Enter your host for installation:"); + + let mut choice = String::new(); + io::stdin().read_line(&mut choice).unwrap(); + + match choice.trim() { + "1" => { + let mut garrus_config = Easy::new(); + garrus_config.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/garrus/configuration.nix").unwrap(); + + let mut config_file = File::create("data/garrus.nix").unwrap(); + + { + let mut transfer = garrus_config.transfer(); + transfer + .write_function(|data| { + config_file.write_all(data).unwrap(); + Ok(data.len()) + }) + .unwrap(); + transfer.perform().unwrap(); + } + + // Copies the system nix files to /mnt/etc/nixos/ + let _garrus_nix_copy = Command::new("mv") + .args(["data/garrus.nix", "data/gnome.nix", "/mnt/etc/nixos"]) + .output() + .expect("Failed to copy nix files over"); + + let mut nixos_install = Command::new("nixos-install") + .arg("--flake") + .arg("/mnt/etc/nixos#garrus") + .arg("--no-root-passwd") + .stdout(Stdio::inherit()) + .stderr(Stdio::inherit()) + .spawn() + .unwrap(); + + let install_status = nixos_install.wait(); + println!("Exited with status {:?}", install_status); + + break; + } + "2" => { + let mut vm_config = Easy::new(); + vm_config.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/vm/configuration.nix").unwrap(); + + let mut config_file = File::create("data/vm.nix").unwrap(); + + { + let mut transfer = vm_config.transfer(); + transfer + .write_function(|data| { + config_file.write_all(data).unwrap(); + Ok(data.len()) + }) + .unwrap(); + transfer.perform().unwrap(); + } + + // Copies the system nix files to /mnt/etc/nixos/ + let _garrus_nix_copy = Command::new("mv") + .args(["data/vm.nix", "/mnt/etc/nixos"]) + .output() + .expect("Failed to copy nix files over"); + + let mut nixos_install = Command::new("nixos-install") + .arg("--flake") + .arg("/mnt/etc/nixos#vm") + .arg("--no-root-passwd") + .stdout(Stdio::inherit()) + .stderr(Stdio::inherit()) + .spawn() + .unwrap(); + + let install_status = nixos_install.wait(); + println!("Exited with status {:?}", install_status); + + break; + } + "3" => { + let mut nixos_install = Command::new("nixos-install") + .arg("--flake") + .arg("/mnt/etc/nixos#nixos") + .arg("--no-root-passwd") + .stdout(Stdio::inherit()) + .stderr(Stdio::inherit()) + .spawn() + .unwrap(); + + let install_status = nixos_install.wait(); + println!("Exited with status {:?}", install_status); + + break; + } + _ => println!("Invalid choice, try again."), + } + } +} From 526f90626652ef12587d94cc1a4b6dcfc04601ee Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Wed, 23 Apr 2025 18:43:39 -0600 Subject: [PATCH 073/103] comment out variable to fix warning --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 4b9f9e9..7638f49 100644 --- a/src/main.rs +++ b/src/main.rs @@ -88,8 +88,8 @@ fn mount_partitions(drive_name: &str) { .output() .expect("Failed to create boot directory"); - let boot_source = Some(Path::new(&efi_path)); - let boot_target = Path::new("/mnt/boot"); + //let boot_source = Some(Path::new(&efi_path)); + //let boot_target = Path::new("/mnt/boot"); let _mount_boot = Command::new("mount") .args(["-t", "vfat"]) From 3f0a2b17029ad117be0018bc710a3c20ed84811b Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Wed, 23 Apr 2025 18:52:08 -0600 Subject: [PATCH 074/103] testing ci --- .gitlab-ci.yml | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 776bc61..9126f09 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,12 +1,27 @@ -# You can override the included template(s) by including variable overrides -# SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings -# Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/#customizing-settings -# Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings -# Note that environment variables can be set in several places -# See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence -stages: -- test -sast: - stage: test -include: -- template: Security/SAST.gitlab-ci.yml +image: "rust:latest" + +variables: + # move cargo data into the project directory so it can be cached + CARGO_HOME: ${CI_PROJECT_DIR}/.cargo + # treat compiler warnings as errors (in clippy, when running tests, etc.) + RUSTFLAGS: -Dwarnings + +default: + # cancel the job if a newer pipeline starts for the same MR or branch + interruptible: true + cache: + # use the git branch or tag as cache key, so the cache will be + # shared among CI runs for the same branch or tag + key: ${CI_COMMIT_REF_SLUG} + # we cache .cargo/ and target/, which effectively enables + # incremental builds across different executions of the CI + # for the same branch or the same merge request + paths: + - .cargo + - target + +# a format check is run in parallel with the rest +cargo:fmt: + script: + - rustup component add rustfmt + - cargo fmt --check From 62f1c96f5b126caf9806b7e46086ef5b82e16abf Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Wed, 23 Apr 2025 19:02:56 -0600 Subject: [PATCH 075/103] testing ci --- .gitlab-ci.yml | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9126f09..f9a6bb9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,27 +1,15 @@ image: "rust:latest" -variables: - # move cargo data into the project directory so it can be cached - CARGO_HOME: ${CI_PROJECT_DIR}/.cargo - # treat compiler warnings as errors (in clippy, when running tests, etc.) - RUSTFLAGS: -Dwarnings - -default: - # cancel the job if a newer pipeline starts for the same MR or branch - interruptible: true - cache: - # use the git branch or tag as cache key, so the cache will be - # shared among CI runs for the same branch or tag - key: ${CI_COMMIT_REF_SLUG} - # we cache .cargo/ and target/, which effectively enables - # incremental builds across different executions of the CI - # for the same branch or the same merge request - paths: - - .cargo - - target - -# a format check is run in parallel with the rest -cargo:fmt: +build-job: + stage: build + image: ubuntu:22.04 + needs: + - job: tests-job + - job: prepare-job + artifacts: true script: - - rustup component add rustfmt - - cargo fmt --check + - echo "======== BUILD JOB ========" + - cargo build --release + artifacts: + paths: + - target/release/nyxi-installer From 93e76db0eb0933673d28be9375eb815d50b15600 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Wed, 23 Apr 2025 19:05:10 -0600 Subject: [PATCH 076/103] testing ci --- .gitlab-ci.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f9a6bb9..24df212 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,22 @@ image: "rust:latest" +tests-job: + stage: test + image: rust + script: + - echo "======== TESTS JOB ========" + - cargo test + +prepare-job: + stage: prepare + image: rust + rules: + - if: $CI_COMMIT_TAG + when: never # Do not run this job when a tag is created manually + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run this job when commits are pushed or merged to the default branch + script: + - echo "======== PREPARE JOB ========" + build-job: stage: build image: ubuntu:22.04 From ef2be5c559099ca7ae2c8436244a727c365daf60 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Wed, 23 Apr 2025 19:10:43 -0600 Subject: [PATCH 077/103] mario --- .gitlab-ci.yml | 39 +++++++++------------------------------ 1 file changed, 9 insertions(+), 30 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 24df212..d81deae 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,32 +1,11 @@ -image: "rust:latest" - -tests-job: - stage: test - image: rust +run_test: + image: rust:latest + before_script: + - rustup --version + - rustc -vV + - rustup component add clippy + - rustup component add rustfmt script: - - echo "======== TESTS JOB ========" + - cargo clippy -- --deny clippy::pedantic + - cargo fmt --all -- --check - cargo test - -prepare-job: - stage: prepare - image: rust - rules: - - if: $CI_COMMIT_TAG - when: never # Do not run this job when a tag is created manually - - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run this job when commits are pushed or merged to the default branch - script: - - echo "======== PREPARE JOB ========" - -build-job: - stage: build - image: ubuntu:22.04 - needs: - - job: tests-job - - job: prepare-job - artifacts: true - script: - - echo "======== BUILD JOB ========" - - cargo build --release - artifacts: - paths: - - target/release/nyxi-installer From e54dba7840f5da003971e0cc95122920061d1dbe Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Wed, 23 Apr 2025 19:16:47 -0600 Subject: [PATCH 078/103] add fdisk for docker --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d81deae..e6b37d9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,6 +5,7 @@ run_test: - rustc -vV - rustup component add clippy - rustup component add rustfmt + - apt install -y fdisk script: - cargo clippy -- --deny clippy::pedantic - cargo fmt --all -- --check From 1631730a88f1d19eca2c7cf638eb377efd66dc52 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Wed, 23 Apr 2025 19:19:11 -0600 Subject: [PATCH 079/103] add fdisk for docker --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e6b37d9..a7c5612 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,7 +5,7 @@ run_test: - rustc -vV - rustup component add clippy - rustup component add rustfmt - - apt install -y fdisk + - apt install -y libfdisk-dev script: - cargo clippy -- --deny clippy::pedantic - cargo fmt --all -- --check From c2d803c553cfe8d79a7b38566da73573e69f850d Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Wed, 23 Apr 2025 19:19:11 -0600 Subject: [PATCH 080/103] CI work --- .gitlab-ci.yml | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e6b37d9..6daa052 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,12 +1,28 @@ -run_test: +stages: + - test + - build + - deploy-prod + +test: + stage: test image: rust:latest before_script: - - rustup --version - - rustc -vV - - rustup component add clippy - - rustup component add rustfmt - - apt install -y fdisk + - apt update -m + - apt install -y libfdisk-dev libclang-19-dev script: - - cargo clippy -- --deny clippy::pedantic - - cargo fmt --all -- --check - - cargo test + - cargo test --verbose + +build: + stage: build + image: rust:latest + before_script: + - apt update -m + - apt install -y libfdisk-dev libclang-19-dev + script: + - cargo build --verbose + +deploy-prod: + stage: deploy + script: + - echo "Let's launch!" + environment: production From 469d3820e28d4f1689b005af60c29e1ee6408df5 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Wed, 23 Apr 2025 19:59:58 -0600 Subject: [PATCH 081/103] fix --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6daa052..b4e6278 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,7 @@ stages: - test - build - - deploy-prod + - deploy test: stage: test @@ -21,8 +21,8 @@ build: script: - cargo build --verbose -deploy-prod: - stage: deploy +deploy: + stage: deploy-prod script: - echo "Let's launch!" environment: production From 3537cce31d2e663f33eb0ab709ea8db6101d6f8b Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Wed, 23 Apr 2025 20:00:35 -0600 Subject: [PATCH 082/103] fix --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b4e6278..3242832 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,7 +22,7 @@ build: - cargo build --verbose deploy: - stage: deploy-prod + stage: deploy script: - echo "Let's launch!" environment: production From 563cfda91d792bb90ebe7e8a876acddbfb8b007d Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Wed, 23 Apr 2025 20:08:48 -0600 Subject: [PATCH 083/103] remove deploy and testing artifacts --- .gitlab-ci.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3242832..46ba0c0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,9 +20,6 @@ build: - apt install -y libfdisk-dev libclang-19-dev script: - cargo build --verbose - -deploy: - stage: deploy - script: - - echo "Let's launch!" - environment: production + artifacts: + paths: + - builds/ahoneybun/nyxi-installer From bef700b7fc542b84005634dfb3189c0c2adeac8d Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Wed, 23 Apr 2025 20:11:03 -0600 Subject: [PATCH 084/103] remove deploy and testing artifacts --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 46ba0c0..ac00656 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,5 +21,5 @@ build: script: - cargo build --verbose artifacts: - paths: + paths: - builds/ahoneybun/nyxi-installer From 99aca9a464b3765a937fdcedd62d4c140cfac40f Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Wed, 23 Apr 2025 20:14:48 -0600 Subject: [PATCH 085/103] testing artifacts --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ac00656..8738ddf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,4 +22,4 @@ build: - cargo build --verbose artifacts: paths: - - builds/ahoneybun/nyxi-installer + - /builds/ahoneybun/nyxi-installer From 562f0dac53dbad71c6f59ff319e74f2988a93d15 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Wed, 23 Apr 2025 20:20:45 -0600 Subject: [PATCH 086/103] building release version and upload --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8738ddf..bab0665 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,7 +19,7 @@ build: - apt update -m - apt install -y libfdisk-dev libclang-19-dev script: - - cargo build --verbose + - cargo build --release --verbose artifacts: paths: - - /builds/ahoneybun/nyxi-installer + - /builds/ahoneybun/nyxi-installer/target/release/nyxi-installer From aaeb2136a9a0890c3abafc0a1cba95fc64f76e34 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Wed, 23 Apr 2025 20:30:09 -0600 Subject: [PATCH 087/103] chmod the build --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bab0665..bd0d5af 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,6 @@ stages: - test - build - - deploy test: stage: test @@ -20,6 +19,7 @@ build: - apt install -y libfdisk-dev libclang-19-dev script: - cargo build --release --verbose + - chmod +x /builds/ahoneybun/nyxi-installer/target/release/nyxi-installer artifacts: paths: - /builds/ahoneybun/nyxi-installer/target/release/nyxi-installer From a6941102a45a12562f035c06b6dc17826fe34739 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 24 Apr 2025 07:06:20 -0600 Subject: [PATCH 088/103] testing upload and release --- .gitlab-ci.yml | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bd0d5af..d029b17 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,11 @@ stages: - test - build + - upload + - release + +variables: + PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/nyxi-installer/${CI_COMMIT_TAG}" test: stage: test @@ -18,8 +23,27 @@ build: - apt update -m - apt install -y libfdisk-dev libclang-19-dev script: - - cargo build --release --verbose + - cargo build --release + - mkdir bin + - mv /builds/ahoneybun/nyxi-installer/target/release/nyxi-installer /bin/nyxi-installer - chmod +x /builds/ahoneybun/nyxi-installer/target/release/nyxi-installer + cache: + paths: + - target/release/ artifacts: - paths: - - /builds/ahoneybun/nyxi-installer/target/release/nyxi-installer + paths: + - bin + +upload: + stage: upload + image: curlimages/curl:latest + rules: + - if: $CI_COMMIT_TAG + script: + - 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file bin/nyxi-installer ${PACKAGE_REGISTRY_URL}/nyxi-installer' + +release: + stage: release + image: registry.gitlab.com/gitlab-org/release-cli:latest + script: + - 'release-cli create --name "nyxi-installer" --assets-link "{\"name\":\"nyxi-installer\", \"url\":\"${PACKAGE_REGISTRY_URL}/nyxi-installer\"}"' From 1a0de19932150827ada66b847bc1cfe5a2659dd5 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 24 Apr 2025 07:11:43 -0600 Subject: [PATCH 089/103] fix chmod --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d029b17..5b8e510 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,7 +26,7 @@ build: - cargo build --release - mkdir bin - mv /builds/ahoneybun/nyxi-installer/target/release/nyxi-installer /bin/nyxi-installer - - chmod +x /builds/ahoneybun/nyxi-installer/target/release/nyxi-installer + - chmod +x /bin/nyxi-installer cache: paths: - target/release/ From e6475f738caa89654477f8ef81dce47687b04712 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 24 Apr 2025 07:19:09 -0600 Subject: [PATCH 090/103] add missing tag-name --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5b8e510..1b9ed98 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,4 +46,4 @@ release: stage: release image: registry.gitlab.com/gitlab-org/release-cli:latest script: - - 'release-cli create --name "nyxi-installer" --assets-link "{\"name\":\"nyxi-installer\", \"url\":\"${PACKAGE_REGISTRY_URL}/nyxi-installer\"}"' + - 'release-cli create --name "nyxi-installer" --tag-name "v${MAJOR}.${MINOR}.${REVISION}" --assets-link "{\"name\":\"nyxi-installer\", \"url\":\"${PACKAGE_REGISTRY_URL}/nyxi-installer\"}"' From 55d0ea77d9dbe1a34b7c8a1f129d89b1fe1549e2 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 24 Apr 2025 07:25:19 -0600 Subject: [PATCH 091/103] fix tag-name --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1b9ed98..caa1849 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,4 +46,4 @@ release: stage: release image: registry.gitlab.com/gitlab-org/release-cli:latest script: - - 'release-cli create --name "nyxi-installer" --tag-name "v${MAJOR}.${MINOR}.${REVISION}" --assets-link "{\"name\":\"nyxi-installer\", \"url\":\"${PACKAGE_REGISTRY_URL}/nyxi-installer\"}"' + - 'release-cli create --name "nyxi-installer" --tag-name $CI_COMMIT_TAG --assets-link "{\"name\":\"nyxi-installer\", \"url\":\"${PACKAGE_REGISTRY_URL}/nyxi-installer\"}"' From 45cedd2dc1677515239f12d0b71689f7c996b6b5 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 24 Apr 2025 07:34:08 -0600 Subject: [PATCH 092/103] fix tag-name --- .gitlab-ci.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index caa1849..1de163c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,22 +28,22 @@ build: - mv /builds/ahoneybun/nyxi-installer/target/release/nyxi-installer /bin/nyxi-installer - chmod +x /bin/nyxi-installer cache: - paths: - - target/release/ + paths: + - target/release/ artifacts: - paths: - - bin + paths: + - bin upload: - stage: upload - image: curlimages/curl:latest - rules: - - if: $CI_COMMIT_TAG - script: - - 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file bin/nyxi-installer ${PACKAGE_REGISTRY_URL}/nyxi-installer' + stage: upload + image: curlimages/curl:latest + rules: + - if: $CI_COMMIT_TAG + script: + - 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file bin/nyxi-installer ${PACKAGE_REGISTRY_URL}/nyxi-installer' release: stage: release image: registry.gitlab.com/gitlab-org/release-cli:latest script: - - 'release-cli create --name "nyxi-installer" --tag-name $CI_COMMIT_TAG --assets-link "{\"name\":\"nyxi-installer\", \"url\":\"${PACKAGE_REGISTRY_URL}/nyxi-installer\"}"' + - release-cli create --name "nyxi-installer" --tag-name $CI_COMMIT_TAG --assets-link "{\"name\":\"nyxi-installer\", \"url\":\"${PACKAGE_REGISTRY_URL}/nyxi-installer\"}" From 129ef355c89c5599a7bf30f7898f13f7f72fa795 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 24 Apr 2025 07:39:38 -0600 Subject: [PATCH 093/103] fix tag-name --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1de163c..3e75378 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,4 +46,4 @@ release: stage: release image: registry.gitlab.com/gitlab-org/release-cli:latest script: - - release-cli create --name "nyxi-installer" --tag-name $CI_COMMIT_TAG --assets-link "{\"name\":\"nyxi-installer\", \"url\":\"${PACKAGE_REGISTRY_URL}/nyxi-installer\"}" + - release-cli create --name "nyxi-installer" --tag-name "the crab strikes" --assets-link "{\"name\":\"nyxi-installer\", \"url\":\"${PACKAGE_REGISTRY_URL}/nyxi-installer\"}" From 462939f70b74eea2f9a433e6cb78f08215fa64a8 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 24 Apr 2025 07:46:42 -0600 Subject: [PATCH 094/103] fix tag-name --- .gitlab-ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3e75378..6b3936d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,5 +45,8 @@ upload: release: stage: release image: registry.gitlab.com/gitlab-org/release-cli:latest - script: - - release-cli create --name "nyxi-installer" --tag-name "the crab strikes" --assets-link "{\"name\":\"nyxi-installer\", \"url\":\"${PACKAGE_REGISTRY_URL}/nyxi-installer\"}" + rules: + - if: $CI_COMMIT_TAG + release: + tag_name: '$CI_COMMIT_TAG' + description: '$CI_COMMIT_TAG' From dfaba208d83c304517a27c50a43cc38211ff58f0 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 24 Apr 2025 07:48:11 -0600 Subject: [PATCH 095/103] add script for release --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6b3936d..e6935a2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,6 +47,8 @@ release: image: registry.gitlab.com/gitlab-org/release-cli:latest rules: - if: $CI_COMMIT_TAG + script: + - echo "running release_job" release: tag_name: '$CI_COMMIT_TAG' description: '$CI_COMMIT_TAG' From a5475d76da2b5cde7f82e0c33533b7b07b77b780 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 24 Apr 2025 07:57:30 -0600 Subject: [PATCH 096/103] fix upload --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e6935a2..7ec18a9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -40,7 +40,7 @@ upload: rules: - if: $CI_COMMIT_TAG script: - - 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file bin/nyxi-installer ${PACKAGE_REGISTRY_URL}/nyxi-installer' + - 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file /bin/nyxi-installer ${PACKAGE_REGISTRY_URL}/nyxi-installer' release: stage: release From 010858d4c5ffb41c0f6463d55483de8ce92b044c Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 24 Apr 2025 08:08:01 -0600 Subject: [PATCH 097/103] remove upload --- .gitlab-ci.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7ec18a9..7e53229 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,6 @@ stages: - test - build - - upload - release variables: @@ -34,14 +33,6 @@ build: paths: - bin -upload: - stage: upload - image: curlimages/curl:latest - rules: - - if: $CI_COMMIT_TAG - script: - - 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file /bin/nyxi-installer ${PACKAGE_REGISTRY_URL}/nyxi-installer' - release: stage: release image: registry.gitlab.com/gitlab-org/release-cli:latest From 22eaee4866101c290010226ba03eed8a0d73e6ff Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 24 Apr 2025 08:25:02 -0600 Subject: [PATCH 098/103] more testing --- .gitlab-ci.yml | 87 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 62 insertions(+), 25 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7e53229..3801a8c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,45 +1,82 @@ stages: + - prepare - test - build - release -variables: - PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/nyxi-installer/${CI_COMMIT_TAG}" - -test: +prepare-job: + stage: prepare + image: rust + rules: + - if: $CI_COMMIT_TAG + when: never # Do not run this job when a tag is created manually + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run this job when commits are pushed or merged to the default branch + script: + - echo "======== PREPARE JOB ========" + - echo "PKG_VERSION=$(awk -F ' = ' '$1 ~ /version/ { gsub(/["]/, "", $2); printf("%s",$2) }' Cargo.toml)" >> variables.env + - echo "PKG_REGISTRY_URL=${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic" >> variables.env + - echo $PKG_VERSION + artifacts: + reports: + dotenv: variables.env +test-job: stage: test image: rust:latest - before_script: + script: + - echo "======== TESTS JOB ========" - apt update -m - apt install -y libfdisk-dev libclang-19-dev - script: - cargo test --verbose -build: +build-job: stage: build image: rust:latest - before_script: + script: + - echo "======== BUILD JOB ========" - apt update -m - apt install -y libfdisk-dev libclang-19-dev - script: - cargo build --release - mkdir bin - - mv /builds/ahoneybun/nyxi-installer/target/release/nyxi-installer /bin/nyxi-installer - - chmod +x /bin/nyxi-installer - cache: - paths: - - target/release/ + - mv /builds/ahoneybun/nyxi-installer/target/release/nyxi-installer bin/nyxi-installer-v${PKG_VERSION} artifacts: paths: - - bin + - bin/ -release: - stage: release - image: registry.gitlab.com/gitlab-org/release-cli:latest - rules: - - if: $CI_COMMIT_TAG - script: - - echo "running release_job" - release: - tag_name: '$CI_COMMIT_TAG' - description: '$CI_COMMIT_TAG' +release-job: + stage: release + image: registry.gitlab.com/gitlab-org/release-cli:latest + needs: + - job: prepare-job + artifacts: true + - job: build-job + script: + - echo "======== RELEASE JOB ========" + rules: + - if: $CI_COMMIT_TAG + when: never # Do not run this job when a tag is created manually + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run this job when commits are pushed or merged to the default branch + release: + tag_name: "v$PKG_VERSION" + description: "NixOS installer in Rust : v$PKG_VERSION" + ref: "$CI_COMMIT_SHA" # The tag is created from the pipeline SHA. + assets: + links: + - name: "v$PKG_VERSION" + url: "${PKG_REGISTRY_URL}/x86_64-unknown-linux-gnu/v${PKG_VERSION}/nyxi-installer" + +upload-job: + stage: release + image: curlimages/curl:latest + needs: + - job: prepare-job + artifacts: true + - job: build-job + artifacts: true + rules: + - if: $CI_COMMIT_TAG + when: never # Do not run this job when a tag is created manually + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run this job when commits are pushed or merged to the default branch + script: + - echo "======== UPLOAD JOB ========" + - ls -la bin/ + - 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file bin/nyxi-installer-v${PKG_VERSION} ${PKG_REGISTRY_URL}/x86_64-unknown-linux-gnu/v${PKG_VERSION}/nyxi-installer' From 6aa6d925f163cc38d85a8b9b577778868bf87f52 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 24 Apr 2025 12:47:12 -0600 Subject: [PATCH 099/103] add version number to release --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3801a8c..0bbca8f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -62,7 +62,7 @@ release-job: assets: links: - name: "v$PKG_VERSION" - url: "${PKG_REGISTRY_URL}/x86_64-unknown-linux-gnu/v${PKG_VERSION}/nyxi-installer" + url: "${PKG_REGISTRY_URL}/x86_64-unknown-linux-gnu/v${PKG_VERSION}/nyxi-installer-v${PKG_VERSION}" upload-job: stage: release From c56acc8a33c70bb5a5953e8db3038cc6d0f78879 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 24 Apr 2025 12:56:56 -0600 Subject: [PATCH 100/103] fix issue with data directory --- src/main.rs | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/src/main.rs b/src/main.rs index 7638f49..372549f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -114,7 +114,7 @@ fn grab_flake() { easy.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/flake.nix") .unwrap(); - let mut file = File::create("data/flake.nix").unwrap(); + let mut file = File::create("flake.nix").unwrap(); { let mut transfer = easy.transfer(); @@ -133,7 +133,7 @@ fn grab_config() { easy.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/configuration.nix") .unwrap(); - let mut file = File::create("data/configuration.nix").unwrap(); + let mut file = File::create("configuration.nix").unwrap(); { let mut transfer = easy.transfer(); @@ -152,7 +152,7 @@ fn grab_home() { easy.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/home.nix") .unwrap(); - let mut file = File::create("data/home.nix").unwrap(); + let mut file = File::create("home.nix").unwrap(); { let mut transfer = easy.transfer(); @@ -172,7 +172,7 @@ fn grab_gnome() { .url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/desktops/gnome.nix") .unwrap(); - let mut config_file = File::create("data/gnome.nix").unwrap(); + let mut config_file = File::create("gnome.nix").unwrap(); { let mut transfer = gnome_config.transfer(); @@ -245,12 +245,7 @@ fn main() { // Copies the nix files to /mnt/etc/nixos/ let _nix_move = Command::new("mv") - .args([ - "-f", - "data/flake.nix", - "data/configuration.nix", - "data/home.nix", - ]) + .args(["-f", "flake.nix", "configuration.nix", "home.nix"]) .arg("/mnt/etc/nixos") .output() .expect("Failed to move nix files over"); @@ -289,7 +284,7 @@ fn main() { let mut garrus_config = Easy::new(); garrus_config.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/garrus/configuration.nix").unwrap(); - let mut config_file = File::create("data/garrus.nix").unwrap(); + let mut config_file = File::create("garrus.nix").unwrap(); { let mut transfer = garrus_config.transfer(); @@ -304,7 +299,7 @@ fn main() { // Copies the system nix files to /mnt/etc/nixos/ let _garrus_nix_copy = Command::new("mv") - .args(["data/garrus.nix", "data/gnome.nix", "/mnt/etc/nixos"]) + .args(["garrus.nix", "gnome.nix", "/mnt/etc/nixos"]) .output() .expect("Failed to copy nix files over"); @@ -326,7 +321,7 @@ fn main() { let mut vm_config = Easy::new(); vm_config.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/vm/configuration.nix").unwrap(); - let mut config_file = File::create("data/vm.nix").unwrap(); + let mut config_file = File::create("vm.nix").unwrap(); { let mut transfer = vm_config.transfer(); @@ -341,7 +336,7 @@ fn main() { // Copies the system nix files to /mnt/etc/nixos/ let _garrus_nix_copy = Command::new("mv") - .args(["data/vm.nix", "/mnt/etc/nixos"]) + .args(["vm.nix", "/mnt/etc/nixos"]) .output() .expect("Failed to copy nix files over"); From 58b2337efa724bf5fa4a12130f7836614468e073 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 24 Apr 2025 13:12:27 -0600 Subject: [PATCH 101/103] run when a tag is manually created --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0bbca8f..f69d56f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -53,7 +53,6 @@ release-job: - echo "======== RELEASE JOB ========" rules: - if: $CI_COMMIT_TAG - when: never # Do not run this job when a tag is created manually - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run this job when commits are pushed or merged to the default branch release: tag_name: "v$PKG_VERSION" From 40d1209d75f93c791582556753ca389c8b5881a5 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 24 Apr 2025 13:16:45 -0600 Subject: [PATCH 102/103] hotfix with nix file creation --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 69aee11..6a365e2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nyxi-installer" -version = "2.0.0" +version = "2.0.1" edition = "2021" [dependencies] From 0d32bf0d6edb67c398537aff1d555f48999b9631 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 24 Apr 2025 13:26:01 -0600 Subject: [PATCH 103/103] fix release upload --- .gitlab-ci.yml | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f69d56f..6bf9262 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -61,7 +61,7 @@ release-job: assets: links: - name: "v$PKG_VERSION" - url: "${PKG_REGISTRY_URL}/x86_64-unknown-linux-gnu/v${PKG_VERSION}/nyxi-installer-v${PKG_VERSION}" + url: "${PKG_REGISTRY_URL}/x86_64-unknown-linux-gnu/v${PKG_VERSION}/nyxi-installer" upload-job: stage: release diff --git a/Cargo.toml b/Cargo.toml index 6a365e2..2e8fa81 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nyxi-installer" -version = "2.0.1" +version = "2.0.2" edition = "2021" [dependencies]