From eb1e50aceaa3c23128dfe4af939b9af238380652 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 28 Mar 2023 18:52:55 +0000 Subject: [PATCH 01/41] Update install.sh --- install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install.sh b/install.sh index b2df964..d7129ed 100644 --- a/install.sh +++ b/install.sh @@ -56,8 +56,7 @@ read swapName sudo mkfs.fat -F32 -n EFI $efiName sudo mkswap $swapName # swap partition -sudo mkfs.ext4 $rootName # /root partition -sudo e2label $rootName NixOS +sudo mkfs.btrfs -L root $rootName # /root partition # 0. Mount the filesystems. sudo swapon $swapName From 967bf36bdefc344a64bba9098a093296a90deacb Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 28 Mar 2023 19:02:08 +0000 Subject: [PATCH 02/41] Update install.sh --- install.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index d7129ed..50cb081 100644 --- a/install.sh +++ b/install.sh @@ -58,13 +58,24 @@ sudo mkfs.fat -F32 -n EFI $efiName sudo mkswap $swapName # swap partition sudo mkfs.btrfs -L root $rootName # /root partition -# 0. Mount the filesystems. +# Mount the filesystems. sudo swapon $swapName sudo mount $rootName /mnt +# Create Subvolumes +btrfs subvolume create /mnt/@ +btrfs subvolume create /mnt/@home + +# Unmount root +sudo umount /mnt + +# Mount the subvolumes. +mount -o noatime,commit=120,compress=zstd:10,subvol=@ /dev/lvm/root /mnt +mkdir /mnt/home +mount -o noatime,commit=120,compress=zstd:10,subvol=@home /dev/lvm/root /mnt/home + # Mount the EFI partition. -sudo mkdir /mnt/boot/ -sudo mount $efiName /mnt/boot +mount --mkdir $efiName /mnt/boot/ # Generate Nix configuration sudo nixos-generate-config --root /mnt From df9711b88bf3141c826cec008f703f72b06def61 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 28 Mar 2023 19:04:12 +0000 Subject: [PATCH 03/41] Add sudo --- install.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index 50cb081..26eedda 100644 --- a/install.sh +++ b/install.sh @@ -63,19 +63,19 @@ sudo swapon $swapName sudo mount $rootName /mnt # Create Subvolumes -btrfs subvolume create /mnt/@ -btrfs subvolume create /mnt/@home +sudo btrfs subvolume create /mnt/@ +sudo btrfs subvolume create /mnt/@home # Unmount root sudo umount /mnt # Mount the subvolumes. -mount -o noatime,commit=120,compress=zstd:10,subvol=@ /dev/lvm/root /mnt -mkdir /mnt/home -mount -o noatime,commit=120,compress=zstd:10,subvol=@home /dev/lvm/root /mnt/home +sudo mount -o noatime,commit=120,compress=zstd:10,subvol=@ /dev/lvm/root /mnt +sudo mkdir /mnt/home +sudo mount -o noatime,commit=120,compress=zstd:10,subvol=@home /dev/lvm/root /mnt/home # Mount the EFI partition. -mount --mkdir $efiName /mnt/boot/ +sudo mount --mkdir $efiName /mnt/boot/ # Generate Nix configuration sudo nixos-generate-config --root /mnt From ccade8a217505a68d4beb9b1426fa6ad0899c9fe Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 28 Mar 2023 19:08:50 +0000 Subject: [PATCH 04/41] Update rootName --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 26eedda..7b57a9c 100644 --- a/install.sh +++ b/install.sh @@ -70,9 +70,9 @@ sudo btrfs subvolume create /mnt/@home sudo umount /mnt # Mount the subvolumes. -sudo mount -o noatime,commit=120,compress=zstd:10,subvol=@ /dev/lvm/root /mnt +sudo mount -o noatime,commit=120,compress=zstd:10,subvol=@ $rootName /mnt sudo mkdir /mnt/home -sudo mount -o noatime,commit=120,compress=zstd:10,subvol=@home /dev/lvm/root /mnt/home +sudo mount -o noatime,commit=120,compress=zstd:10,subvol=@home $rootName /mnt/home # Mount the EFI partition. sudo mount --mkdir $efiName /mnt/boot/ From 950e2ef11a93d4c329a796a7693cc12f7b4aa221 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Wed, 29 Mar 2023 14:18:13 +0000 Subject: [PATCH 05/41] Update @ subvol name --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 7b57a9c..320af78 100644 --- a/install.sh +++ b/install.sh @@ -63,7 +63,7 @@ sudo swapon $swapName sudo mount $rootName /mnt # Create Subvolumes -sudo btrfs subvolume create /mnt/@ +sudo btrfs subvolume create /mnt/@root sudo btrfs subvolume create /mnt/@home # Unmount root From c477296da56025e2a9f7071ce791c21af2d8d45e Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Wed, 29 Mar 2023 14:23:13 +0000 Subject: [PATCH 06/41] Add Sway --- install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install.sh b/install.sh index 320af78..c7f4bab 100644 --- a/install.sh +++ b/install.sh @@ -94,6 +94,7 @@ echo "Which Desktop Environment do you want?" echo "1) Plasma" echo "2) GNOME" echo "3) Pantheon" +echo "4) Sway" echo "0) None or N/A" read desktopChoice @@ -115,6 +116,11 @@ if [ $desktopChoice = 3 ]; then sudo sed -i "10 i \ ./pantheon.nix" /mnt/etc/nixos/configuration.nix fi +if [ $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 + fi echo "" From 084993248e3502f67d7be41fa2f84549b8bf599a Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Fri, 31 Mar 2023 15:21:49 +0000 Subject: [PATCH 07/41] Update install.sh --- install.sh | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/install.sh b/install.sh index c7f4bab..3fab391 100644 --- a/install.sh +++ b/install.sh @@ -55,12 +55,26 @@ read swapName # Create EFI partition sudo mkfs.fat -F32 -n EFI $efiName +# Encrypt the root partition +sudo cryptsetup luksFormat -v -s 512 -h sha512 $rootName + +# Open the encrypted root partition +sudo cryptsetup luksOpen $rootName crypt-root + +sudo pvcreate /dev/mapper/crypt-root +sudo vgcreate lvm /dev/mapper/crypt-root + +sudo lvcreate -L 4G -n swap lvm +sudo lvcreate -l '100%FREE' -n root lvm + +sudo cryptsetup config $rootName --label luks + sudo mkswap $swapName # swap partition sudo mkfs.btrfs -L root $rootName # /root partition # Mount the filesystems. -sudo swapon $swapName -sudo mount $rootName /mnt +sudo swapon /dev/mapper/lvm-swap +sudo mount /dev/mapper/lvm-root /mnt # Create Subvolumes sudo btrfs subvolume create /mnt/@root @@ -86,7 +100,7 @@ sudo nixos-generate-config --root /mnt 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/luks/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/ echo "" @@ -150,13 +164,7 @@ if [ $deviceChoice = 3 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/galp4.nix > galp4.nix; sudo mv -f galp4.nix /mnt/etc/nixos/ sudo sed -i "11 i \ ./galp4.nix" /mnt/etc/nixos/configuration.nix fi - -if [ $deviceChoice = 4 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/hp-omen.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 -fi - -if [ $deviceChoice = 5 ]; then + #curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/pinebook-pro.nix > configuration.nix; s #curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/pinebook-pro.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/pbp.nix > pbp.nix; sudo mv -f pbp.nix /mnt/etc/nixos/ sudo sed -i "11 i \ ./pbp.nix" /mnt/etc/nixos/configuration.nix From 99f366132ec389dbac0313630c11bc1274a078e7 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Fri, 31 Mar 2023 15:30:35 +0000 Subject: [PATCH 08/41] Update install.sh --- install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install.sh b/install.sh index 3fab391..8e521c0 100644 --- a/install.sh +++ b/install.sh @@ -172,5 +172,8 @@ fi fi +# Replace LUKS device +sudo sed -i "s#/dev/sda#$rootName#g" /mnt/etc/nixos/configuration.nix + # Install sudo nixos-install From 3b411028aac027317f89f5bbbd011d9e62d454f7 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Fri, 31 Mar 2023 15:36:27 +0000 Subject: [PATCH 09/41] Update install.sh --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 8e521c0..79eafca 100644 --- a/install.sh +++ b/install.sh @@ -69,8 +69,8 @@ sudo lvcreate -l '100%FREE' -n root lvm sudo cryptsetup config $rootName --label luks -sudo mkswap $swapName # swap partition -sudo mkfs.btrfs -L root $rootName # /root partition +sudo mkswap /dev/lvm/swap # swap partition +sudo mkfs.btrfs -L root /dev/mapper/lvm-root # /root partition # Mount the filesystems. sudo swapon /dev/mapper/lvm-swap From 766177340bfd5d8ab32db1eedd130dca0f3d1f51 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Fri, 31 Mar 2023 15:40:15 +0000 Subject: [PATCH 10/41] Update install.sh --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 79eafca..2744d0d 100644 --- a/install.sh +++ b/install.sh @@ -84,9 +84,9 @@ sudo btrfs subvolume create /mnt/@home sudo umount /mnt # Mount the subvolumes. -sudo mount -o noatime,commit=120,compress=zstd:10,subvol=@ $rootName /mnt -sudo mkdir /mnt/home -sudo mount -o noatime,commit=120,compress=zstd:10,subvol=@home $rootName /mnt/home +mount -o noatime,commit=120,compress=zstd:10,subvol=@ /dev/lvm/root /mnt +mkdir /mnt/home +mount -o noatime,commit=120,compress=zstd:10,subvol=@home /dev/lvm/root /mnt/home # Mount the EFI partition. sudo mount --mkdir $efiName /mnt/boot/ From e4241b0c58c32cab9b56fbba0e1cfb2e976a50aa Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Fri, 31 Mar 2023 15:43:09 +0000 Subject: [PATCH 11/41] Update install.sh --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 2744d0d..547a54a 100644 --- a/install.sh +++ b/install.sh @@ -84,9 +84,9 @@ sudo btrfs subvolume create /mnt/@home sudo umount /mnt # Mount the subvolumes. -mount -o noatime,commit=120,compress=zstd:10,subvol=@ /dev/lvm/root /mnt -mkdir /mnt/home -mount -o noatime,commit=120,compress=zstd:10,subvol=@home /dev/lvm/root /mnt/home +sudo mount -o noatime,commit=120,compress=zstd:10,subvol=@ /dev/lvm/root /mnt +sudo mkdir /mnt/home +sudo mount -o noatime,commit=120,compress=zstd:10,subvol=@home /dev/lvm/root /mnt/home # Mount the EFI partition. sudo mount --mkdir $efiName /mnt/boot/ From 6fca38d2f2ea6d3c0a69360632b12bbc790b65f9 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Fri, 31 Mar 2023 15:48:46 +0000 Subject: [PATCH 12/41] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 547a54a..c31bf97 100644 --- a/install.sh +++ b/install.sh @@ -84,7 +84,7 @@ sudo btrfs subvolume create /mnt/@home sudo umount /mnt # Mount the subvolumes. -sudo mount -o noatime,commit=120,compress=zstd:10,subvol=@ /dev/lvm/root /mnt +sudo mount -o noatime,commit=120,compress=zstd:10,subvol=@root /dev/lvm/root /mnt sudo mkdir /mnt/home sudo mount -o noatime,commit=120,compress=zstd:10,subvol=@home /dev/lvm/root /mnt/home From 99df74fc41cf08d933451ee303d68832f85b06dd Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Fri, 31 Mar 2023 15:56:50 +0000 Subject: [PATCH 13/41] Update install.sh --- install.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/install.sh b/install.sh index c31bf97..f392a7f 100644 --- a/install.sh +++ b/install.sh @@ -164,6 +164,13 @@ if [ $deviceChoice = 3 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/galp4.nix > galp4.nix; sudo mv -f galp4.nix /mnt/etc/nixos/ sudo sed -i "11 i \ ./galp4.nix" /mnt/etc/nixos/configuration.nix fi + +if [ $deviceChoice = 4 ]; then + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/hp-omen.nix > hp-omen.nix; sudo mv -f hp-omen.nix /mnt/etc/nixos/ + sudo sed -i "11 i \ ./galp4.nix" /mnt/etc/nixos/configuration.nix +fi + +if [ $deviceChoice = 5 ]; then #curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/pinebook-pro.nix > configuration.nix; s #curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/pinebook-pro.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/pbp.nix > pbp.nix; sudo mv -f pbp.nix /mnt/etc/nixos/ From 4e3857b2e2b2fadc6e8f323633380ea90c18c2f4 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Fri, 31 Mar 2023 15:57:41 +0000 Subject: [PATCH 14/41] Update install.sh --- install.sh | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/install.sh b/install.sh index f392a7f..e4b52a2 100644 --- a/install.sh +++ b/install.sh @@ -118,23 +118,19 @@ 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 -else -if [ $desktopChoice = 2 ]; then +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 -fi -if [ $desktopChoice = 3 ]; then +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 -fi -if [ $desktopChoice = 4 ]; then +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 - + fi echo "" From 6fb781a07824125c8e2224aa572da694d257c9e4 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Fri, 31 Mar 2023 16:02:21 +0000 Subject: [PATCH 15/41] Update install.sh --- install.sh | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/install.sh b/install.sh index e4b52a2..322cdd8 100644 --- a/install.sh +++ b/install.sh @@ -130,7 +130,7 @@ elif [ $desktopChoice = 3 ]; then 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 echo "" @@ -149,29 +149,24 @@ read deviceChoice if [ $deviceChoice = 1 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/oryp6.nix > oryp6.nix; sudo mv -f oryp6.nix /mnt/etc/nixos/ sudo sed -i "11 i \ ./oryp6.nix" /mnt/etc/nixos/configuration.nix -else -if [ $deviceChoice = 2 ]; then +elif [ $deviceChoice = 2 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/galp3-b.nix > galp3-b.nix; sudo mv -f galp3-b.nix /mnt/etc/nixos/ sudo sed -i "11 i \ ./galp3-b.nix" /mnt/etc/nixos/configuration.nix -fi -if [ $deviceChoice = 3 ]; then +elif [ $deviceChoice = 3 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/galp4.nix > galp4.nix; sudo mv -f galp4.nix /mnt/etc/nixos/ sudo sed -i "11 i \ ./galp4.nix" /mnt/etc/nixos/configuration.nix -fi -if [ $deviceChoice = 4 ]; then +elif [ $deviceChoice = 4 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/hp-omen.nix > hp-omen.nix; sudo mv -f hp-omen.nix /mnt/etc/nixos/ sudo sed -i "11 i \ ./galp4.nix" /mnt/etc/nixos/configuration.nix -fi -if [ $deviceChoice = 5 ]; then +elif [ $deviceChoice = 5 ]; then #curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/pinebook-pro.nix > configuration.nix; s #curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/pinebook-pro.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/pbp.nix > pbp.nix; sudo mv -f pbp.nix /mnt/etc/nixos/ sudo sed -i "11 i \ ./pbp.nix" /mnt/etc/nixos/configuration.nix -fi fi From 3dc06836bf4d4ebe499e84c8347ac1d73bc0e1a4 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sat, 1 Apr 2023 23:46:57 +0000 Subject: [PATCH 16/41] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 322cdd8..38c7af0 100644 --- a/install.sh +++ b/install.sh @@ -100,7 +100,7 @@ sudo nixos-generate-config --root /mnt 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/luks/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/ echo "" From 266b04f6318403e51856085fa4b5f50e82f3fe1d Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Wed, 12 Apr 2023 16:19:53 +0000 Subject: [PATCH 17/41] Update install.sh --- install.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/install.sh b/install.sh index 38c7af0..a2d4be3 100644 --- a/install.sh +++ b/install.sh @@ -140,6 +140,7 @@ echo "2) Galago Pro (galp3-b)" echo "3) Galago Pro (galp4)" echo "4) HP Omen (15-dh0015nr)" echo "5) Pinebook Pro" +echo "6) Virtual Machine" echo "0) None or N/A" read deviceChoice @@ -168,6 +169,10 @@ elif [ $deviceChoice = 5 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/pbp.nix > pbp.nix; sudo mv -f pbp.nix /mnt/etc/nixos/ sudo sed -i "11 i \ ./pbp.nix" /mnt/etc/nixos/configuration.nix +elif [ $deviceChoice = 6 ]; then + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/vm.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ +fi + fi # Replace LUKS device From b9d5261c20d08d00e6cca860985e09c8e14fefd6 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Wed, 12 Apr 2023 16:26:12 +0000 Subject: [PATCH 18/41] Update install.sh --- install.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/install.sh b/install.sh index a2d4be3..574092e 100644 --- a/install.sh +++ b/install.sh @@ -100,7 +100,7 @@ sudo nixos-generate-config --root /mnt 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/luks/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/ echo "" @@ -173,8 +173,6 @@ elif [ $deviceChoice = 6 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/vm.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ fi -fi - # Replace LUKS device sudo sed -i "s#/dev/sda#$rootName#g" /mnt/etc/nixos/configuration.nix From 123f0e32b582eea9d73c130e311f0957d8a978dc Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 17 Apr 2023 13:22:25 +0000 Subject: [PATCH 19/41] Update install.sh --- install.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index 574092e..14412e8 100644 --- a/install.sh +++ b/install.sh @@ -138,9 +138,10 @@ echo "Which device are you installing to?" echo "1) Oryx Pro (oryp6)" echo "2) Galago Pro (galp3-b)" echo "3) Galago Pro (galp4)" -echo "4) HP Omen (15-dh0015nr)" -echo "5) Pinebook Pro" -echo "6) Virtual Machine" +echo "4) Thelio NVIDIA (thelio-b1)" +echo "5) HP Omen (15-dh0015nr)" +echo "6) Pinebook Pro" +echo "7) Virtual Machine" echo "0) None or N/A" read deviceChoice @@ -160,16 +161,19 @@ elif [ $deviceChoice = 3 ]; then sudo sed -i "11 i \ ./galp4.nix" /mnt/etc/nixos/configuration.nix elif [ $deviceChoice = 4 ]; then + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/thelio-nvidia.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ + +elif [ $deviceChoice = 5 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/hp-omen.nix > hp-omen.nix; sudo mv -f hp-omen.nix /mnt/etc/nixos/ sudo sed -i "11 i \ ./galp4.nix" /mnt/etc/nixos/configuration.nix -elif [ $deviceChoice = 5 ]; then +elif [ $deviceChoice = 6 ]; then #curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/pinebook-pro.nix > configuration.nix; s #curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/pinebook-pro.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/pbp.nix > pbp.nix; sudo mv -f pbp.nix /mnt/etc/nixos/ sudo sed -i "11 i \ ./pbp.nix" /mnt/etc/nixos/configuration.nix -elif [ $deviceChoice = 6 ]; then +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/ fi From 6dcc21244adb34cc835bad0c327de4f0a490e2e7 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 17 Apr 2023 17:33:30 +0000 Subject: [PATCH 20/41] Add Thelio with NVIDIA sed option --- install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 14412e8..dadf1a8 100644 --- a/install.sh +++ b/install.sh @@ -161,7 +161,7 @@ elif [ $deviceChoice = 3 ]; then sudo sed -i "11 i \ ./galp4.nix" /mnt/etc/nixos/configuration.nix elif [ $deviceChoice = 4 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/thelio-nvidia.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ + elif [ $deviceChoice = 5 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/hp-omen.nix > hp-omen.nix; sudo mv -f hp-omen.nix /mnt/etc/nixos/ @@ -180,5 +180,8 @@ fi # Replace LUKS device sudo sed -i "s#/dev/sda#$rootName#g" /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 + # Install sudo nixos-install From 8060b0f4f258bd6885e617f32ee0fefe0259e939 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 17 Apr 2023 17:37:07 +0000 Subject: [PATCH 21/41] Update install.sh --- install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index dadf1a8..0cc724e 100644 --- a/install.sh +++ b/install.sh @@ -161,11 +161,12 @@ elif [ $deviceChoice = 3 ]; then sudo sed -i "11 i \ ./galp4.nix" /mnt/etc/nixos/configuration.nix elif [ $deviceChoice = 4 ]; then - + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/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 = 5 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/hp-omen.nix > hp-omen.nix; sudo mv -f hp-omen.nix /mnt/etc/nixos/ - sudo sed -i "11 i \ ./galp4.nix" /mnt/etc/nixos/configuration.nix + sudo sed -i "11 i \ ./hp-omen.nix" /mnt/etc/nixos/configuration.nix elif [ $deviceChoice = 6 ]; then #curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/pinebook-pro.nix > configuration.nix; s From 6f4ae4be9d3bd3e9b7f08248a3d730dd1b44f354 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 17 Apr 2023 18:03:44 +0000 Subject: [PATCH 22/41] Test if statement --- install.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/install.sh b/install.sh index 0cc724e..a282230 100644 --- a/install.sh +++ b/install.sh @@ -35,6 +35,22 @@ echo 19 # Change last partition to Swap. echo w # write changes. ) | sudo fdisk $driveName -w always -W always +if [ $driveName == /dev/nvme* ]; then + # Format the NVMe drive with the ext4 filesystem + mkfs.ext4 $DEVICE_PATH + +# Check if the device is a SATA drive +elif [ $driveName == /dev/sd* ]; then + # Format the SATA drive with the NTFS filesystem + mkfs.ntfs $DEVICE_PATH + +# Check if the device is an eMMC drive +elif [ $driveName == /dev/mmcblk* ]; then + # Format the eMMC drive with the FAT32 filesystem + mkfs.fat -F 32 $DEVICE_PATH + +fi + # List the new partitions. lsblk -f From 2596d54e282de6f3f849ac8424d0b4428c175c0a Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 17 Apr 2023 18:38:43 +0000 Subject: [PATCH 23/41] Update install.sh --- install.sh | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index a282230..55fbacd 100644 --- a/install.sh +++ b/install.sh @@ -36,18 +36,31 @@ echo w # write changes. ) | sudo fdisk $driveName -w always -W always if [ $driveName == /dev/nvme* ]; then - # Format the NVMe drive with the ext4 filesystem - mkfs.ext4 $DEVICE_PATH + # Set variables + efiName="${driveName}p1" + rootName="${driveName}p2" + swapName="${driveName}p3" # Check if the device is a SATA drive elif [ $driveName == /dev/sd* ]; then - # Format the SATA drive with the NTFS filesystem - mkfs.ntfs $DEVICE_PATH + # Set variables + efiName="${driveName}1" + rootName="${driveName}2" + swapName="${driveName}3" + +# Check if the device is a Virtual drive +elif [ $driveName == /dev/vd* ]; then + # Set variables + efiName="${driveName}1" + rootName="${driveName}2" + swapName="${driveName}3" # Check if the device is an eMMC drive elif [ $driveName == /dev/mmcblk* ]; then - # Format the eMMC drive with the FAT32 filesystem - mkfs.fat -F 32 $DEVICE_PATH + # Set variables + efiName="${driveName}1" + rootName="${driveName}2" + swapName="${driveName}3" fi From 8c46a23503f70abcb36843450b1745ade19cc4ca Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 17 Apr 2023 18:39:54 +0000 Subject: [PATCH 24/41] Update install.sh --- install.sh | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/install.sh b/install.sh index 55fbacd..fb2032a 100644 --- a/install.sh +++ b/install.sh @@ -67,20 +67,6 @@ fi # List the new partitions. lsblk -f -# Format the partitions : -echo "----------" -echo "" -echo "Which is the EFI partition?" -read efiName - -echo "" -echo "Which is the root partition?" -read rootName - -echo "" -echo "Which is the swap partition?" -read swapName - # Create EFI partition sudo mkfs.fat -F32 -n EFI $efiName From c447fbc67f3dd10e8fbefbbce2e61c1c2b31c7fe Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 17 Apr 2023 18:45:54 +0000 Subject: [PATCH 25/41] Update install.sh --- install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install.sh b/install.sh index fb2032a..1ed48d3 100644 --- a/install.sh +++ b/install.sh @@ -95,6 +95,8 @@ sudo mount /dev/mapper/lvm-root /mnt sudo btrfs subvolume create /mnt/@root sudo btrfs subvolume create /mnt/@home +sleep 120 + # Unmount root sudo umount /mnt From 3652e3663b7d321dec4a3764022e160ca39a312f Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 17 Apr 2023 18:47:05 +0000 Subject: [PATCH 26/41] debugging --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 1ed48d3..1ba407a 100644 --- a/install.sh +++ b/install.sh @@ -70,6 +70,8 @@ lsblk -f # Create EFI partition sudo mkfs.fat -F32 -n EFI $efiName +sleep 120 + # Encrypt the root partition sudo cryptsetup luksFormat -v -s 512 -h sha512 $rootName @@ -95,8 +97,6 @@ sudo mount /dev/mapper/lvm-root /mnt sudo btrfs subvolume create /mnt/@root sudo btrfs subvolume create /mnt/@home -sleep 120 - # Unmount root sudo umount /mnt From b8fefcdfb8465248e00a3c0df0f4bd122a8468d9 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 17 Apr 2023 18:50:06 +0000 Subject: [PATCH 27/41] Update install.sh --- install.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/install.sh b/install.sh index 1ba407a..847167b 100644 --- a/install.sh +++ b/install.sh @@ -37,30 +37,30 @@ echo w # write changes. if [ $driveName == /dev/nvme* ]; then # Set variables - efiName="${driveName}p1" - rootName="${driveName}p2" - swapName="${driveName}p3" + efiName=${driveName}p1 + rootName=${driveName}p2 + swapName=${driveName}p3 # Check if the device is a SATA drive elif [ $driveName == /dev/sd* ]; then # Set variables - efiName="${driveName}1" - rootName="${driveName}2" - swapName="${driveName}3" + efiName=${driveName}1 + rootName=${driveName}2 + swapName=${driveName}3 # Check if the device is a Virtual drive elif [ $driveName == /dev/vd* ]; then # Set variables - efiName="${driveName}1" - rootName="${driveName}2" - swapName="${driveName}3" + efiName=${driveName}1 + rootName=${driveName}2 + swapName=${driveName}3 # Check if the device is an eMMC drive elif [ $driveName == /dev/mmcblk* ]; then # Set variables - efiName="${driveName}1" - rootName="${driveName}2" - swapName="${driveName}3" + efiName=${driveName}1 + rootName=${driveName}2 + swapName=${driveName}3 fi From fd766280d5e0313998054d31791032b5b947305e Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 17 Apr 2023 18:58:36 +0000 Subject: [PATCH 28/41] Update install.sh --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index 847167b..9774f11 100644 --- a/install.sh +++ b/install.sh @@ -70,6 +70,7 @@ lsblk -f # Create EFI partition sudo mkfs.fat -F32 -n EFI $efiName +echo $efiName sleep 120 # Encrypt the root partition From cd5e8ec98cddfb8f43f69700acef6975e4bb77e3 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 17 Apr 2023 19:08:18 +0000 Subject: [PATCH 29/41] Update install.sh --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 9774f11..784ee95 100644 --- a/install.sh +++ b/install.sh @@ -51,9 +51,9 @@ elif [ $driveName == /dev/sd* ]; then # Check if the device is a Virtual drive elif [ $driveName == /dev/vd* ]; then # Set variables - efiName=${driveName}1 - rootName=${driveName}2 - swapName=${driveName}3 + efiName={$driveName}1 + rootName={$driveName}2 + swapName={$driveName}3 # Check if the device is an eMMC drive elif [ $driveName == /dev/mmcblk* ]; then From a1beec96af54d6bc23bc71f1b41de0e456100b86 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 17 Apr 2023 19:09:49 +0000 Subject: [PATCH 30/41] Update install.sh --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 784ee95..c14d61c 100644 --- a/install.sh +++ b/install.sh @@ -51,9 +51,9 @@ elif [ $driveName == /dev/sd* ]; then # Check if the device is a Virtual drive elif [ $driveName == /dev/vd* ]; then # Set variables - efiName={$driveName}1 - rootName={$driveName}2 - swapName={$driveName}3 + efiName="{$driveName}1" + rootName="{$driveName}2" + swapName="{$driveName}3" # Check if the device is an eMMC drive elif [ $driveName == /dev/mmcblk* ]; then From 062259948606258f11b26e1c7d0460842e7e001d Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 17 Apr 2023 19:10:32 +0000 Subject: [PATCH 31/41] Update install.sh --- install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index c14d61c..b854ceb 100644 --- a/install.sh +++ b/install.sh @@ -35,28 +35,28 @@ echo 19 # Change last partition to Swap. echo w # write changes. ) | sudo fdisk $driveName -w always -W always -if [ $driveName == /dev/nvme* ]; then +if [ $driveName = /dev/nvme* ]; then # Set variables efiName=${driveName}p1 rootName=${driveName}p2 swapName=${driveName}p3 # Check if the device is a SATA drive -elif [ $driveName == /dev/sd* ]; then +elif [ $driveName = /dev/sd* ]; then # Set variables efiName=${driveName}1 rootName=${driveName}2 swapName=${driveName}3 # Check if the device is a Virtual drive -elif [ $driveName == /dev/vd* ]; then +elif [ $driveName = /dev/vd* ]; then # Set variables efiName="{$driveName}1" rootName="{$driveName}2" swapName="{$driveName}3" # Check if the device is an eMMC drive -elif [ $driveName == /dev/mmcblk* ]; then +elif [ $driveName = /dev/mmcblk* ]; then # Set variables efiName=${driveName}1 rootName=${driveName}2 From 66e9be884a5a8ae5534a960acbf6a690b08b17e9 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 17 Apr 2023 19:21:56 +0000 Subject: [PATCH 32/41] Update install.sh --- install.sh | 45 +++++++++++++-------------------------------- 1 file changed, 13 insertions(+), 32 deletions(-) diff --git a/install.sh b/install.sh index b854ceb..a4ffc25 100644 --- a/install.sh +++ b/install.sh @@ -35,44 +35,25 @@ echo 19 # Change last partition to Swap. echo w # write changes. ) | sudo fdisk $driveName -w always -W always -if [ $driveName = /dev/nvme* ]; then - # Set variables - efiName=${driveName}p1 - rootName=${driveName}p2 - swapName=${driveName}p3 - -# Check if the device is a SATA drive -elif [ $driveName = /dev/sd* ]; then - # Set variables - efiName=${driveName}1 - rootName=${driveName}2 - swapName=${driveName}3 - -# Check if the device is a Virtual drive -elif [ $driveName = /dev/vd* ]; then - # Set variables - efiName="{$driveName}1" - rootName="{$driveName}2" - swapName="{$driveName}3" - -# Check if the device is an eMMC drive -elif [ $driveName = /dev/mmcblk* ]; then - # Set variables - efiName=${driveName}1 - rootName=${driveName}2 - swapName=${driveName}3 - -fi - # List the new partitions. lsblk -f +echo "----------" +echo "" +echo "Which is the EFI partition?" +read efiName + +echo "" +echo "Which is the root partition?" +read rootName + +echo "" +echo "Which is the swap partition?" +read swapName + # Create EFI partition sudo mkfs.fat -F32 -n EFI $efiName -echo $efiName -sleep 120 - # Encrypt the root partition sudo cryptsetup luksFormat -v -s 512 -h sha512 $rootName From d987e56383d9182075b09537d3676f9ad4a21883 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 17 Apr 2023 20:05:28 +0000 Subject: [PATCH 33/41] Update install.sh --- install.sh | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/install.sh b/install.sh index a4ffc25..b42d06b 100644 --- a/install.sh +++ b/install.sh @@ -2,6 +2,9 @@ # then sets it as a variable for hibernation support ramTotal=$(free -h | awk '/^Mem:/{print $2}'| awk -FG {'print$1'}) +# Set append for drive automation +APPEND="" + # Detect and list the drives. lsblk -f @@ -38,18 +41,16 @@ echo w # write changes. # List the new partitions. lsblk -f -echo "----------" -echo "" -echo "Which is the EFI partition?" -read efiName +if [[ "$driveName" == "/dev/nvme"* || "$driveName" == "/dev/mmcblk0"* ]]; then + APPEND="p" +fi -echo "" -echo "Which is the root partition?" -read rootName - -echo "" -echo "Which is the swap partition?" -read swapName +efiName=${driveName}$APPEND +efiName+=1 +rootName=${driveName}$APPEND +rootName+=2 +swapName=${driveName}$APPEND +swapName+=3 # Create EFI partition sudo mkfs.fat -F32 -n EFI $efiName From 5ad2080f9772741f3de6a19a111254c7009f9aeb Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 17 Apr 2023 20:24:29 +0000 Subject: [PATCH 34/41] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index b42d06b..2378da9 100644 --- a/install.sh +++ b/install.sh @@ -175,7 +175,7 @@ elif [ $deviceChoice = 6 ]; then sudo sed -i "11 i \ ./pbp.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/luks/systems/vm.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ fi # Replace LUKS device From 7caeae09f626843fe2b3d0dac86971599423cfba Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 17 Apr 2023 20:32:39 +0000 Subject: [PATCH 35/41] Move boot.kernelPackages option --- install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 2378da9..ce9547e 100644 --- a/install.sh +++ b/install.sh @@ -163,6 +163,8 @@ elif [ $deviceChoice = 3 ]; then elif [ $deviceChoice = 4 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/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 + # Disable latest kernel for Thelio with NVIDIA GPU + sudo sed -i "s/boot.kernelPackages/# boot.kernelPackages/g" /mnt/etc/nixos/configuration.nix elif [ $deviceChoice = 5 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/hp-omen.nix > hp-omen.nix; sudo mv -f hp-omen.nix /mnt/etc/nixos/ @@ -181,8 +183,5 @@ fi # Replace LUKS device sudo sed -i "s#/dev/sda#$rootName#g" /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 - # Install sudo nixos-install From b31598203354ac5e76fd71b3c85092a546ef1234 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 17 Apr 2023 20:43:13 +0000 Subject: [PATCH 36/41] Fix partitioning --- install.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/install.sh b/install.sh index ce9547e..9fbbaf8 100644 --- a/install.sh +++ b/install.sh @@ -24,17 +24,11 @@ echo +1G # Set +1G as last sector. echo n # Create new partition (for root). echo # Set default partition number. echo # Set default first sector. -echo -4G # Set -4G as last sector. -echo n # Create new partition (for root). -echo # Set default partition number. -echo # Set default first sector. echo # Set last sector. echo t # Change partition type. echo 1 # Pick first partition. echo 1 # Change first partition to EFI system. echo t # Change partition type. -echo 3 # Pick the last partition. -echo 19 # Change last partition to Swap. echo w # write changes. ) | sudo fdisk $driveName -w always -W always From 3263d94099f3d36b1b88d487a8b154459aae426f Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 17 Apr 2023 22:00:16 +0000 Subject: [PATCH 37/41] Update install.sh --- install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install.sh b/install.sh index 9fbbaf8..5ecb783 100644 --- a/install.sh +++ b/install.sh @@ -28,7 +28,6 @@ echo # Set last sector. echo t # Change partition type. echo 1 # Pick first partition. echo 1 # Change first partition to EFI system. -echo t # Change partition type. echo w # write changes. ) | sudo fdisk $driveName -w always -W always From fbe2438d64a7e45b03a879759ee56a42af35cb9d Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 17 Apr 2023 22:06:26 +0000 Subject: [PATCH 38/41] Update install.sh --- install.sh | 60 +++++++++++++++++++++++++++--------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/install.sh b/install.sh index 5ecb783..63587c3 100644 --- a/install.sh +++ b/install.sh @@ -96,36 +96,6 @@ echo "Password is hashed so it is not plaintext" curl https://gitlab.com/ahoneybun/nix-configs/-/raw/luks/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/ -echo "" -echo "Which Desktop Environment do you want?" -echo "1) Plasma" -echo "2) GNOME" -echo "3) Pantheon" -echo "4) Sway" -echo "0) None or N/A" -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 - -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 - echo "" echo "Which device are you installing to?" echo "1) Oryx Pro (oryp6)" @@ -173,6 +143,36 @@ elif [ $deviceChoice = 7 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/luks/systems/vm.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ fi +echo "" +echo "Which Desktop Environment do you want?" +echo "1) Plasma" +echo "2) GNOME" +echo "3) Pantheon" +echo "4) Sway" +echo "0) None or N/A" +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 + +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 + # Replace LUKS device sudo sed -i "s#/dev/sda#$rootName#g" /mnt/etc/nixos/configuration.nix From 33c309eb8d7ca08668291a0a2fda877dfd85be53 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Wed, 19 Apr 2023 00:21:07 +0000 Subject: [PATCH 39/41] Update README.md --- README.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/README.md b/README.md index 9d7a694..564e700 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,7 @@ 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 and Plasma) -- Installs needed packages (`programs.nix`) +- Installs a DE/WM of your choice (currently supporting GNOME, Plasma, Pantheon and Sway) - Installs needed packages for certain hardware nix files are from [this repo](https://gitlab.com/ahoneybun/nix-configs/) but that can be changed as needed. @@ -15,11 +14,9 @@ nix files are from [this repo](https://gitlab.com/ahoneybun/nix-configs/) but th Tested on the following drives: - SATA - NVMe -- eMMC Tested on the following architectures: - x86_64 -- aarch64 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: From b1905abcba244dcdcdb9eb72af46705f2f500733 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Fri, 2 Jun 2023 22:16:47 +0000 Subject: [PATCH 40/41] Update install.sh --- install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 63587c3..d7f2d42 100644 --- a/install.sh +++ b/install.sh @@ -134,9 +134,8 @@ elif [ $deviceChoice = 5 ]; then sudo sed -i "11 i \ ./hp-omen.nix" /mnt/etc/nixos/configuration.nix elif [ $deviceChoice = 6 ]; then - #curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/pinebook-pro.nix > configuration.nix; s - #curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/pinebook-pro.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/pbp.nix > pbp.nix; sudo mv -f pbp.nix /mnt/etc/nixos/ + #curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/aarch64/jaal/pinebook-pro.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/aarch64/jaal/pbp.nix > pbp.nix; sudo mv -f pbp.nix /mnt/etc/nixos/ sudo sed -i "11 i \ ./pbp.nix" /mnt/etc/nixos/configuration.nix elif [ $deviceChoice = 7 ]; then From 092b7cc4f489343415f295c57e93476557c9bc1e Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 6 Jun 2023 16:54:43 +0000 Subject: [PATCH 41/41] Update install.sh --- install.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index d7f2d42..b5d4ab5 100644 --- a/install.sh +++ b/install.sh @@ -112,25 +112,25 @@ 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/oryp6.nix > oryp6.nix; sudo mv -f oryp6.nix /mnt/etc/nixos/ + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/x86_64/oryp6.nix > oryp6.nix; sudo mv -f oryp6.nix /mnt/etc/nixos/ sudo sed -i "11 i \ ./oryp6.nix" /mnt/etc/nixos/configuration.nix elif [ $deviceChoice = 2 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/galp3-b.nix > galp3-b.nix; sudo mv -f galp3-b.nix /mnt/etc/nixos/ + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/x86_64/garrus/configuration.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ sudo sed -i "11 i \ ./galp3-b.nix" /mnt/etc/nixos/configuration.nix elif [ $deviceChoice = 3 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/galp4.nix > galp4.nix; sudo mv -f galp4.nix /mnt/etc/nixos/ + curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/x86_64/galp4.nix > galp4.nix; sudo mv -f galp4.nix /mnt/etc/nixos/ sudo sed -i "11 i \ ./galp4.nix" /mnt/etc/nixos/configuration.nix elif [ $deviceChoice = 4 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/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/ 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 = 5 ]; then - curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/hp-omen.nix > hp-omen.nix; sudo mv -f hp-omen.nix /mnt/etc/nixos/ + 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/ sudo sed -i "11 i \ ./hp-omen.nix" /mnt/etc/nixos/configuration.nix elif [ $deviceChoice = 6 ]; then