From ecd6180813f8c7fd0f89a6dfcd1dc1a0fd422271 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sat, 7 May 2022 14:42:21 -0600 Subject: [PATCH 01/63] first commit --- config-plasma.nix | 57 +++++++++++++++++++++++++++++++++++++++++++++++ install.sh | 17 ++++++++++---- 2 files changed, 70 insertions(+), 4 deletions(-) create mode 100644 config-plasma.nix diff --git a/config-plasma.nix b/config-plasma.nix new file mode 100644 index 0000000..bbd6398 --- /dev/null +++ b/config-plasma.nix @@ -0,0 +1,57 @@ +{ config, pkgs, ... }: + +{ + # Import other configuration modules + # (hardware-configuration.nix is autogenerated upon installation) + # paths in nix expressions are always relative the file which defines them + imports = + [ + ./hardware-configuration.nix + ]; + + boot.loader = { + systemd-boot.enable = true; + }; + + # Name your host machine + networking.hostName = "NixOS-VM"; + + # Set your time zone. + time.timeZone = "America/Denver"; + + # Enter keyboard layout + services.xserver.layout = "us"; + + # Define user accounts + users.extraUsers = + { + aaronh = + { + home = "/home/aaronh"; + extraGroups = [ "wheel" "networkmanager" ]; + isNormalUser = true; + }; + }; + + # Install some packages + environment.systemPackages = + with pkgs; + [ + thunderbird + firefox + fish + tilix + ]; + + # Enable the OpenSSH daemon + services.openssh.enable = true; + + # Plasma + services.xserver.enable = true; + services.xserver.desktopManager.plasma5.enable = true; + + # System + system.autoUpgrade.enable = true; + system.autoUpgrade.allowReboot = true; + +} diff --git a/install.sh b/install.sh index 725f9ed..48417af 100644 --- a/install.sh +++ b/install.sh @@ -60,17 +60,26 @@ sudo cryptsetup luksFormat -v -s 512 -h sha512 $rootName sudo cryptsetup luksOpen $rootName crypt-root sudo mkfs.fat -F32 -n EFI $efiName # EFI partition -sudo mkfs.ext4 -L root /dev/mapper/crypt-root # / partition +mkfs.btrfs -L root /dev/mapper/crypt-root # /root partition sudo mkswap -L swap $swapName # swap partition # 0. Mount the filesystems. sudo mount /dev/disk/by-label/root /mnt sudo swapon $swapName -# 1. Create directory to mount EFI partition. -sudo mkdir /mnt/boot/ +# Create Subvolumes +btrfs subvolume create /mnt/@ +btrfs subvolume create /mnt/@home -# 2.Mount the EFI partition. +# 1. Create directory to mount partitions and subvolume +mkdir /mnt/boot/ +mkdir /mnt/home/ + +# 2. Mount the subvolumes. +mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@ $rootName /mnt +mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@home $rootName /mnt/home + +# 3. Mount the EFI partition. sudo mount $efiName /mnt/boot # Generate Nix configuration From 9c5496e43279c1d8ee6b1b9917f04cfe7677220f Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sat, 7 May 2022 14:46:40 -0600 Subject: [PATCH 02/63] fix permission issue --- install.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/install.sh b/install.sh index 48417af..1341a87 100644 --- a/install.sh +++ b/install.sh @@ -60,7 +60,7 @@ sudo cryptsetup luksFormat -v -s 512 -h sha512 $rootName sudo cryptsetup luksOpen $rootName crypt-root sudo mkfs.fat -F32 -n EFI $efiName # EFI partition -mkfs.btrfs -L root /dev/mapper/crypt-root # /root partition +sudo mkfs.btrfs -L root /dev/mapper/crypt-root # /root partition sudo mkswap -L swap $swapName # swap partition # 0. Mount the filesystems. @@ -68,16 +68,16 @@ sudo mount /dev/disk/by-label/root /mnt sudo swapon $swapName # Create Subvolumes -btrfs subvolume create /mnt/@ -btrfs subvolume create /mnt/@home +sudo btrfs subvolume create /mnt/@ +sudo btrfs subvolume create /mnt/@home # 1. Create directory to mount partitions and subvolume -mkdir /mnt/boot/ -mkdir /mnt/home/ +sudo mkdir /mnt/boot/ +sudo mkdir /mnt/home/ # 2. Mount the subvolumes. -mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@ $rootName /mnt -mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@home $rootName /mnt/home +sudo mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@ $rootName /mnt +sudo mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@home $rootName /mnt/home # 3. Mount the EFI partition. sudo mount $efiName /mnt/boot From a492cb0234925bb4552048c9526c44e04712feb4 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sat, 7 May 2022 21:02:01 +0000 Subject: [PATCH 03/63] Update install.sh --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 1341a87..7fcf81f 100644 --- a/install.sh +++ b/install.sh @@ -69,15 +69,15 @@ sudo swapon $swapName # Create Subvolumes sudo btrfs subvolume create /mnt/@ -sudo btrfs subvolume create /mnt/@home +# sudo btrfs subvolume create /mnt/@home # 1. Create directory to mount partitions and subvolume sudo mkdir /mnt/boot/ -sudo mkdir /mnt/home/ +# sudo mkdir /mnt/home/ # 2. Mount the subvolumes. sudo mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@ $rootName /mnt -sudo mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@home $rootName /mnt/home +# sudo mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@home $rootName /mnt/home # 3. Mount the EFI partition. sudo mount $efiName /mnt/boot From 39d79e0510dc5867c38f882d42264e0070bd1df6 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sat, 7 May 2022 21:02:21 +0000 Subject: [PATCH 04/63] Update config-plasma.nix --- config-plasma.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/config-plasma.nix b/config-plasma.nix index bbd6398..53ecd5f 100644 --- a/config-plasma.nix +++ b/config-plasma.nix @@ -13,6 +13,19 @@ systemd-boot.enable = true; }; + { + fileSystems."/" = + { device = "/dev/disk/by-label/root" ; + fsType = "btrfs"; + options = [ "subvol=nixos" "compress=zstd" "autodefrag" "noatime" ]; + }; + + boot.initrd.luks.devices."crypt-root" = { + device = "/dev/disk/by-label/root" ; + preLVM = true; + }; + } + # Name your host machine networking.hostName = "NixOS-VM"; From 9005ce240dd8e20e4442f20d74cf5eb13683331b Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sat, 7 May 2022 21:11:31 +0000 Subject: [PATCH 05/63] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 7fcf81f..089bfbd 100644 --- a/install.sh +++ b/install.sh @@ -85,7 +85,7 @@ sudo mount $efiName /mnt/boot # Generate Nix configuration sudo nixos-generate-config --root /mnt -curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/main/config-gnome.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ +curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/main/config-plasma.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ # Install sudo nixos-install From 4a02d4b1e6bf28a72fb05bd49bef3c60e2a7b798 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sat, 7 May 2022 21:15:07 +0000 Subject: [PATCH 06/63] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 089bfbd..2245aee 100644 --- a/install.sh +++ b/install.sh @@ -85,7 +85,7 @@ sudo mount $efiName /mnt/boot # Generate Nix configuration sudo nixos-generate-config --root /mnt -curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/main/config-plasma.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ +curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/nathaniel-btrfs/config-plasma.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ # Install sudo nixos-install From 3d5b28b79f1f25178ad4ba9497b158d703392583 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sat, 7 May 2022 21:24:01 +0000 Subject: [PATCH 07/63] Update config-plasma.nix --- config-plasma.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/config-plasma.nix b/config-plasma.nix index 53ecd5f..fb28741 100644 --- a/config-plasma.nix +++ b/config-plasma.nix @@ -13,7 +13,6 @@ systemd-boot.enable = true; }; - { fileSystems."/" = { device = "/dev/disk/by-label/root" ; fsType = "btrfs"; @@ -24,7 +23,6 @@ device = "/dev/disk/by-label/root" ; preLVM = true; }; - } # Name your host machine networking.hostName = "NixOS-VM"; From e23a790434eafb2b5a5c03e2a95d44f0b13740e8 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sat, 7 May 2022 21:25:02 +0000 Subject: [PATCH 08/63] Update config-plasma.nix --- config-plasma.nix | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/config-plasma.nix b/config-plasma.nix index fb28741..91cbe84 100644 --- a/config-plasma.nix +++ b/config-plasma.nix @@ -13,16 +13,10 @@ systemd-boot.enable = true; }; - fileSystems."/" = - { device = "/dev/disk/by-label/root" ; - fsType = "btrfs"; - options = [ "subvol=nixos" "compress=zstd" "autodefrag" "noatime" ]; - }; - - boot.initrd.luks.devices."crypt-root" = { - device = "/dev/disk/by-label/root" ; - preLVM = true; - }; + boot.initrd.luks.devices."crypt-root" = { + device = "/dev/disk/by-label/root" ; + preLVM = true; + }; # Name your host machine networking.hostName = "NixOS-VM"; From 78823f9515ea5f10725c774560e2ccf072274216 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sat, 7 May 2022 21:28:20 +0000 Subject: [PATCH 09/63] Update config-plasma.nix --- config-plasma.nix | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/config-plasma.nix b/config-plasma.nix index 91cbe84..8a4ba3f 100644 --- a/config-plasma.nix +++ b/config-plasma.nix @@ -12,12 +12,7 @@ boot.loader = { systemd-boot.enable = true; }; - - boot.initrd.luks.devices."crypt-root" = { - device = "/dev/disk/by-label/root" ; - preLVM = true; - }; - + # Name your host machine networking.hostName = "NixOS-VM"; From c4e8d5c46d2ab669f74e3889e483ea27d65993e3 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sat, 7 May 2022 21:51:47 +0000 Subject: [PATCH 10/63] Update install.sh --- install.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 2245aee..b15aaa5 100644 --- a/install.sh +++ b/install.sh @@ -69,15 +69,18 @@ sudo swapon $swapName # Create Subvolumes sudo btrfs subvolume create /mnt/@ -# sudo btrfs subvolume create /mnt/@home +sudo btrfs subvolume create /mnt/@home + +# Unmount root +sudo umount /mnt # 1. Create directory to mount partitions and subvolume sudo mkdir /mnt/boot/ -# sudo mkdir /mnt/home/ +sudo mkdir /mnt/home/ # 2. Mount the subvolumes. sudo mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@ $rootName /mnt -# sudo mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@home $rootName /mnt/home +sudo mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@home $rootName /mnt/home # 3. Mount the EFI partition. sudo mount $efiName /mnt/boot From c1b8d87a13dd1ec18fac376419d0519f5299fcb9 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sat, 7 May 2022 21:59:00 +0000 Subject: [PATCH 11/63] Update install.sh --- install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index b15aaa5..ad65c9b 100644 --- a/install.sh +++ b/install.sh @@ -79,8 +79,9 @@ sudo mkdir /mnt/boot/ sudo mkdir /mnt/home/ # 2. Mount the subvolumes. -sudo mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@ $rootName /mnt -sudo mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@home $rootName /mnt/home +sudo mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@ /dev/disk/by-label/root /mnt +# sudo mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@ $rootName /mnt +# sudo mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@home $rootName /mnt/home # 3. Mount the EFI partition. sudo mount $efiName /mnt/boot From 008cf4e0997adc0945747d483fa850330804868a Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sat, 7 May 2022 22:15:19 +0000 Subject: [PATCH 12/63] Update install.sh --- install.sh | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/install.sh b/install.sh index ad65c9b..d7a022c 100644 --- a/install.sh +++ b/install.sh @@ -21,8 +21,6 @@ echo +512M # Set +512M as last sector. echo n # Create new partition (for root). echo # Set default partition number. echo # Set default first sector. -echo "-$ramTotal"G # Set Max RAM as last sector. -# echo -4096M # Set -4096 as last sector. echo n # Create new partition (for swap). echo # Set default partition number. echo # Set default first sector. @@ -30,9 +28,6 @@ echo # Set default last sector (rest of the disk). 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 third partition. -echo 19 # Change third partition to Linux swap. echo w # write changes. ) | sudo fdisk $driveName -w always -W always @@ -49,9 +44,8 @@ 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 # Encrypt the root partition sudo cryptsetup luksFormat -v -s 512 -h sha512 $rootName @@ -59,13 +53,18 @@ sudo cryptsetup luksFormat -v -s 512 -h sha512 $rootName # Open the encrypted root partition sudo cryptsetup luksOpen $rootName crypt-root -sudo mkfs.fat -F32 -n EFI $efiName # EFI partition -sudo mkfs.btrfs -L root /dev/mapper/crypt-root # /root partition -sudo mkswap -L swap $swapName # swap partition +sudo pvcreate /dev/mapper/crypt-root +sudo vgcreate lvm /dev/mapper/crypt-root + +sudo lvcreate --size $ramTotal --name swap lvm +sudo lvcreate --extents 100%FREE --name root lvm + +sudo mkswap /dev/lvm/swap # swap partition +sudo mkfs.btrfs /dev/lvm/root # /root partition # 0. Mount the filesystems. -sudo mount /dev/disk/by-label/root /mnt -sudo swapon $swapName +sudo swapon /dev/lvm/swap +sudo mount /dev/lvm/root /mnt # Create Subvolumes sudo btrfs subvolume create /mnt/@ @@ -74,16 +73,14 @@ sudo btrfs subvolume create /mnt/@home # Unmount root sudo umount /mnt -# 1. Create directory to mount partitions and subvolume -sudo mkdir /mnt/boot/ +# Mount the subvolumes. +sudo mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@ /dev/lvm/root /mnt + sudo mkdir /mnt/home/ +sudo mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@home /dev/lvm/root /mnt/home -# 2. Mount the subvolumes. -sudo mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@ /dev/disk/by-label/root /mnt -# sudo mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@ $rootName /mnt -# sudo mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@home $rootName /mnt/home - -# 3. Mount the EFI partition. +# Mount the EFI partition. +sudo mkdir /mnt/boot/ sudo mount $efiName /mnt/boot # Generate Nix configuration From a7190c7e0d5db8c15f2c0689557a3151f9d5e66d Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sat, 7 May 2022 22:27:16 +0000 Subject: [PATCH 13/63] Update config-plasma.nix --- config-plasma.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/config-plasma.nix b/config-plasma.nix index 8a4ba3f..9fd1a1c 100644 --- a/config-plasma.nix +++ b/config-plasma.nix @@ -13,6 +13,18 @@ systemd-boot.enable = true; }; + fileSystems."/" = + { device = "/dev/lvm/root"; + fsType = "btrfs"; + options = [ "subvol=root" "compress=zstd" "noatime" ]; + }; + + fileSystems."/home" = + { device = "/dev/lvm/root"; + fsType = "btrfs"; + options = [ "subvol=home" "compress=zstd" "noatime" ]; + }; + # Name your host machine networking.hostName = "NixOS-VM"; From ba1d1ed501f859eb582b70a441ec132b9f7fede7 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sat, 7 May 2022 22:30:50 +0000 Subject: [PATCH 14/63] Update config-plasma.nix --- config-plasma.nix | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/config-plasma.nix b/config-plasma.nix index 9fd1a1c..bbd6398 100644 --- a/config-plasma.nix +++ b/config-plasma.nix @@ -12,18 +12,6 @@ boot.loader = { systemd-boot.enable = true; }; - - fileSystems."/" = - { device = "/dev/lvm/root"; - fsType = "btrfs"; - options = [ "subvol=root" "compress=zstd" "noatime" ]; - }; - - fileSystems."/home" = - { device = "/dev/lvm/root"; - fsType = "btrfs"; - options = [ "subvol=home" "compress=zstd" "noatime" ]; - }; # Name your host machine networking.hostName = "NixOS-VM"; From fddf4aeb5309f3f6c1dbbb4f998cfd7b33d0e8b7 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sat, 7 May 2022 23:49:36 +0000 Subject: [PATCH 15/63] Update config-plasma.nix --- config-plasma.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/config-plasma.nix b/config-plasma.nix index bbd6398..1f16356 100644 --- a/config-plasma.nix +++ b/config-plasma.nix @@ -13,6 +13,15 @@ systemd-boot.enable = true; }; + + boot.initrd.luks.devices = [ + { + name = "root"; + device = "/dev/disk/by-label/root"; + preLVM = true; + allowDiscards = true; + } + ]; # Name your host machine networking.hostName = "NixOS-VM"; From 484b513f598a6f7bbe026d2337853e8b9f24b80a Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sat, 7 May 2022 23:59:12 +0000 Subject: [PATCH 16/63] Update config-plasma.nix --- config-plasma.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/config-plasma.nix b/config-plasma.nix index 1f16356..d7b728c 100644 --- a/config-plasma.nix +++ b/config-plasma.nix @@ -13,15 +13,13 @@ systemd-boot.enable = true; }; - - boot.initrd.luks.devices = [ - { + boot.initrd.luks.devices = { name = "root"; device = "/dev/disk/by-label/root"; preLVM = true; allowDiscards = true; } - ]; + # Name your host machine networking.hostName = "NixOS-VM"; From 14afed7093b617a6d538381f38e33dbc1ddca1a1 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sun, 8 May 2022 00:01:18 +0000 Subject: [PATCH 17/63] Update config-plasma.nix --- config-plasma.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config-plasma.nix b/config-plasma.nix index d7b728c..037a92e 100644 --- a/config-plasma.nix +++ b/config-plasma.nix @@ -18,7 +18,7 @@ device = "/dev/disk/by-label/root"; preLVM = true; allowDiscards = true; - } + }; # Name your host machine networking.hostName = "NixOS-VM"; From 0e62a183a10cb038bb798ee77def1d9d697759fc Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sun, 8 May 2022 00:02:27 +0000 Subject: [PATCH 18/63] Update config-plasma.nix --- config-plasma.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/config-plasma.nix b/config-plasma.nix index 037a92e..e5afc1a 100644 --- a/config-plasma.nix +++ b/config-plasma.nix @@ -17,7 +17,6 @@ name = "root"; device = "/dev/disk/by-label/root"; preLVM = true; - allowDiscards = true; }; # Name your host machine From 553d46da6eb677222bbab9577a039599f7652f40 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sun, 8 May 2022 00:09:42 +0000 Subject: [PATCH 19/63] Update install.sh --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index d7a022c..e4be7c5 100644 --- a/install.sh +++ b/install.sh @@ -59,8 +59,8 @@ sudo vgcreate lvm /dev/mapper/crypt-root sudo lvcreate --size $ramTotal --name swap lvm sudo lvcreate --extents 100%FREE --name root lvm -sudo mkswap /dev/lvm/swap # swap partition -sudo mkfs.btrfs /dev/lvm/root # /root partition +sudo mkswap /dev/lvm/swap # swap partition +sudo mkfs.btrfs -L root /dev/lvm/root # /root partition # 0. Mount the filesystems. sudo swapon /dev/lvm/swap From 2a3beb67389ac6e837160aeda66d8969c0df6703 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sun, 8 May 2022 00:11:41 +0000 Subject: [PATCH 20/63] Update config-plasma.nix --- config-plasma.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config-plasma.nix b/config-plasma.nix index e5afc1a..ca33d7c 100644 --- a/config-plasma.nix +++ b/config-plasma.nix @@ -14,8 +14,8 @@ }; boot.initrd.luks.devices = { - name = "root"; - device = "/dev/disk/by-label/root"; + name = "dm-name-crypt-root"; + device = "/dev/disk/by-id/dm-name-crypt-root"; preLVM = true; }; From 968b6461f2b7b5461829b52975a5a5ae6f84d6bf Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sun, 8 May 2022 13:48:58 +0000 Subject: [PATCH 21/63] Update install.sh --- install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install.sh b/install.sh index e4be7c5..2752598 100644 --- a/install.sh +++ b/install.sh @@ -59,6 +59,8 @@ sudo vgcreate lvm /dev/mapper/crypt-root sudo lvcreate --size $ramTotal --name swap lvm sudo lvcreate --extents 100%FREE --name root lvm +sudo cryptsetup config $rootName --label root + sudo mkswap /dev/lvm/swap # swap partition sudo mkfs.btrfs -L root /dev/lvm/root # /root partition From 5d3894fbf1060944323d9e43bc8a407f3d48f61b Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sun, 8 May 2022 13:49:25 +0000 Subject: [PATCH 22/63] Update config-plasma.nix --- config-plasma.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config-plasma.nix b/config-plasma.nix index ca33d7c..e5afc1a 100644 --- a/config-plasma.nix +++ b/config-plasma.nix @@ -14,8 +14,8 @@ }; boot.initrd.luks.devices = { - name = "dm-name-crypt-root"; - device = "/dev/disk/by-id/dm-name-crypt-root"; + name = "root"; + device = "/dev/disk/by-label/root"; preLVM = true; }; From d73eafd7cde9a9fcbad1fa2bd9ad378d19370d5a Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sun, 8 May 2022 14:10:32 +0000 Subject: [PATCH 23/63] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 2752598..57529fc 100644 --- a/install.sh +++ b/install.sh @@ -59,7 +59,7 @@ sudo vgcreate lvm /dev/mapper/crypt-root sudo lvcreate --size $ramTotal --name swap lvm sudo lvcreate --extents 100%FREE --name root lvm -sudo cryptsetup config $rootName --label root +sudo cryptsetup config $rootName --label luks sudo mkswap /dev/lvm/swap # swap partition sudo mkfs.btrfs -L root /dev/lvm/root # /root partition From f5c243c788f19c7e766e30d4a08ba7278b8ed8c5 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sun, 8 May 2022 14:16:19 +0000 Subject: [PATCH 24/63] Update config-plasma.nix --- config-plasma.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/config-plasma.nix b/config-plasma.nix index e5afc1a..7651bce 100644 --- a/config-plasma.nix +++ b/config-plasma.nix @@ -14,10 +14,11 @@ }; boot.initrd.luks.devices = { - name = "root"; - device = "/dev/disk/by-label/root"; - preLVM = true; - }; + crypt-root = { + device = "/dev/disk/by-label/luks"; + preLVM = true; + }; + }; # Name your host machine networking.hostName = "NixOS-VM"; From 09fc5efb9a6d5dea067852262a297be128feb43b Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sun, 8 May 2022 14:44:36 +0000 Subject: [PATCH 25/63] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3e5c300..2cf50eb 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ https://nixos.org/manual/nixos/stable/index.html#sec-installation-booting-networ ## Start the installer ``` -curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/main/install.sh > install.sh; sh install.sh +curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/nathaniel-btrfs/install.sh > install.sh; sh install.sh ``` The following will happen: From 43ff67addb4f3b365ac0eb0001d91f6c0b7c30c6 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sun, 8 May 2022 15:53:24 +0000 Subject: [PATCH 26/63] Update config-plasma.nix --- config-plasma.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config-plasma.nix b/config-plasma.nix index 7651bce..25a8df4 100644 --- a/config-plasma.nix +++ b/config-plasma.nix @@ -23,6 +23,8 @@ # Name your host machine networking.hostName = "NixOS-VM"; + networking.networkmanager.enable = true; + # Set your time zone. time.timeZone = "America/Denver"; From a19e36f5b940844c4126ba803e870bf69effa6c6 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sun, 8 May 2022 15:58:12 +0000 Subject: [PATCH 27/63] Update config-plasma.nix --- config-plasma.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/config-plasma.nix b/config-plasma.nix index 25a8df4..5f8fbdf 100644 --- a/config-plasma.nix +++ b/config-plasma.nix @@ -46,6 +46,7 @@ environment.systemPackages = with pkgs; [ + libsForQt5.plasma-nm thunderbird firefox fish From 2ed295f2c419d28a8928e4850f45e18d3d36d68d Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sun, 8 May 2022 17:10:44 +0000 Subject: [PATCH 28/63] Update install.sh --- install.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index 57529fc..7960be1 100644 --- a/install.sh +++ b/install.sh @@ -94,11 +94,19 @@ curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/nathaniel-btrfs/conf sudo nixos-install # Enter into installed OS -# sudo mount -o bind /dev /mnt/dev -# sudo mount -o bind /proc /mnt/proc -# sudo mount -o bind /sys /mnt/sys -# sudo chroot /mnt /nix/var/nix/profiles/system/activate -# sudo chroot /mnt /run/current-system/sw/bin/bash +sudo mount -o bind /dev /mnt/dev +sudo mount -o bind /proc /mnt/proc +sudo mount -o bind /sys /mnt/sys +sudo chroot /mnt /nix/var/nix/profiles/system/activate +sudo chroot /mnt /run/current-system/sw/bin/bash + +# Set user password +echo "----------" +echo "" +echo "Which is the username?" +read userName + +sudo passwd $userName # Removed downloaded script. rm install.sh From fa3172128f6980ebb6a56618ab557cb318bcb9a3 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sun, 8 May 2022 17:22:18 +0000 Subject: [PATCH 29/63] Update config-plasma.nix --- config-plasma.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/config-plasma.nix b/config-plasma.nix index 5f8fbdf..c9bb2c6 100644 --- a/config-plasma.nix +++ b/config-plasma.nix @@ -31,6 +31,15 @@ # Enter keyboard layout services.xserver.layout = "us"; + # Enable flatpak + services.flatpak.enable = true; + + # Enable PackageKit for Discover + services.packagekit.enable = true; + + # Enable fwupd + services.fwupd.enable = true; + # Define user accounts users.extraUsers = { @@ -46,10 +55,12 @@ environment.systemPackages = with pkgs; [ - libsForQt5.plasma-nm - thunderbird firefox fish + flatpak + libsForQt5.plasma-nm + libsForQt5.discover + thunderbird tilix ]; From 677a22883607b23e6561ca0f9bffd715bf0ead8c Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sun, 8 May 2022 17:31:08 +0000 Subject: [PATCH 30/63] Update install.sh --- install.sh | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/install.sh b/install.sh index 7960be1..97d0fb0 100644 --- a/install.sh +++ b/install.sh @@ -93,20 +93,18 @@ curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/nathaniel-btrfs/conf # Install sudo nixos-install +# Start Setup section +curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/nathaniel-btrfs/setup.sh > /mnt/setup.sh + # Enter into installed OS sudo mount -o bind /dev /mnt/dev sudo mount -o bind /proc /mnt/proc sudo mount -o bind /sys /mnt/sys sudo chroot /mnt /nix/var/nix/profiles/system/activate -sudo chroot /mnt /run/current-system/sw/bin/bash +sudo chroot /mnt /run/current-system/sw/bin/bash setup.sh -# Set user password -echo "----------" -echo "" -echo "Which is the username?" -read userName - -sudo passwd $userName - -# Removed downloaded script. +# Removed install script. rm install.sh + +# Remove setup script +rm setup.sh From 792c649dda2deb6d16147ce3f35ad146a7d98288 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sun, 8 May 2022 17:31:09 +0000 Subject: [PATCH 31/63] Add new file --- setup.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 setup.sh diff --git a/setup.sh b/setup.sh new file mode 100644 index 0000000..d33731b --- /dev/null +++ b/setup.sh @@ -0,0 +1,9 @@ +# Set user password +echo "----------" +echo "" +echo "Which is the username?" +read userName + +sudo passwd $userName + +exit From 30104b0cba4c53168943181ea048a219af2fc2dc Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sun, 8 May 2022 17:39:14 +0000 Subject: [PATCH 32/63] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 97d0fb0..a02468b 100644 --- a/install.sh +++ b/install.sh @@ -94,7 +94,7 @@ curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/nathaniel-btrfs/conf sudo nixos-install # Start Setup section -curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/nathaniel-btrfs/setup.sh > /mnt/setup.sh +curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/nathaniel-btrfs/setup.sh > setup.sh # Enter into installed OS sudo mount -o bind /dev /mnt/dev From 91346ea31a41979c8f370a6d57c0e18de85704c7 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sun, 8 May 2022 17:39:26 +0000 Subject: [PATCH 33/63] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index a02468b..10ddebb 100644 --- a/install.sh +++ b/install.sh @@ -94,7 +94,7 @@ curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/nathaniel-btrfs/conf sudo nixos-install # Start Setup section -curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/nathaniel-btrfs/setup.sh > setup.sh +sudo curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/nathaniel-btrfs/setup.sh > /mntsetup.sh # Enter into installed OS sudo mount -o bind /dev /mnt/dev From d1960d36ac0d23b05a3d385c7ed7730a04c4baba Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sun, 8 May 2022 17:42:24 +0000 Subject: [PATCH 34/63] Update install.sh --- install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 10ddebb..ca15c6e 100644 --- a/install.sh +++ b/install.sh @@ -94,7 +94,8 @@ curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/nathaniel-btrfs/conf sudo nixos-install # Start Setup section -sudo curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/nathaniel-btrfs/setup.sh > /mntsetup.sh +sudo -i +curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/nathaniel-btrfs/setup.sh > /mntsetup.sh # Enter into installed OS sudo mount -o bind /dev /mnt/dev From 4b779638a2d86f75e0fd012866b3f71241d64c3d Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sun, 8 May 2022 17:47:01 +0000 Subject: [PATCH 35/63] Update install.sh --- install.sh | 58 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/install.sh b/install.sh index ca15c6e..e056ed9 100644 --- a/install.sh +++ b/install.sh @@ -31,6 +31,9 @@ echo 1 # Change first partition to EFI system. echo w # write changes. ) | sudo fdisk $driveName -w always -W always +# Move to root +sudo -i + # List the new partitions. lsblk -f @@ -45,64 +48,63 @@ echo "Which is the root partition?" read rootName # Create EFI partition -sudo mkfs.fat -F32 -n EFI $efiName +mkfs.fat -F32 -n EFI $efiName # Encrypt the root partition -sudo cryptsetup luksFormat -v -s 512 -h sha512 $rootName +cryptsetup luksFormat -v -s 512 -h sha512 $rootName # Open the encrypted root partition -sudo cryptsetup luksOpen $rootName crypt-root +cryptsetup luksOpen $rootName crypt-root -sudo pvcreate /dev/mapper/crypt-root -sudo vgcreate lvm /dev/mapper/crypt-root +pvcreate /dev/mapper/crypt-root +vgcreate lvm /dev/mapper/crypt-root -sudo lvcreate --size $ramTotal --name swap lvm -sudo lvcreate --extents 100%FREE --name root lvm +lvcreate --size $ramTotal --name swap lvm +lvcreate --extents 100%FREE --name root lvm -sudo cryptsetup config $rootName --label luks +cryptsetup config $rootName --label luks -sudo mkswap /dev/lvm/swap # swap partition -sudo mkfs.btrfs -L root /dev/lvm/root # /root partition +mkswap /dev/lvm/swap # swap partition +mkfs.btrfs -L root /dev/lvm/root # /root partition # 0. Mount the filesystems. -sudo swapon /dev/lvm/swap -sudo mount /dev/lvm/root /mnt +swapon /dev/lvm/swap +mount /dev/lvm/root /mnt # Create Subvolumes -sudo btrfs subvolume create /mnt/@ -sudo btrfs subvolume create /mnt/@home +btrfs subvolume create /mnt/@ +btrfs subvolume create /mnt/@home # Unmount root -sudo umount /mnt +umount /mnt # Mount the subvolumes. -sudo mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@ /dev/lvm/root /mnt +mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@ /dev/lvm/root /mnt -sudo mkdir /mnt/home/ -sudo mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@home /dev/lvm/root /mnt/home +mkdir /mnt/home/ +mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@home /dev/lvm/root /mnt/home # Mount the EFI partition. -sudo mkdir /mnt/boot/ -sudo mount $efiName /mnt/boot +mkdir /mnt/boot/ +mount $efiName /mnt/boot # Generate Nix configuration -sudo nixos-generate-config --root /mnt +nixos-generate-config --root /mnt curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/nathaniel-btrfs/config-plasma.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ # Install -sudo nixos-install +nixos-install # Start Setup section -sudo -i curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/nathaniel-btrfs/setup.sh > /mntsetup.sh # Enter into installed OS -sudo mount -o bind /dev /mnt/dev -sudo mount -o bind /proc /mnt/proc -sudo mount -o bind /sys /mnt/sys -sudo chroot /mnt /nix/var/nix/profiles/system/activate -sudo chroot /mnt /run/current-system/sw/bin/bash setup.sh +mount -o bind /dev /mnt/dev +mount -o bind /proc /mnt/proc +mount -o bind /sys /mnt/sys +chroot /mnt /nix/var/nix/profiles/system/activate +chroot /mnt /run/current-system/sw/bin/bash setup.sh # Removed install script. rm install.sh From d1c89984bd1b22def3c674240cf73be1f5277e40 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sun, 8 May 2022 17:49:24 +0000 Subject: [PATCH 36/63] Revert "Update install.sh" This reverts commit 4b779638a2d86f75e0fd012866b3f71241d64c3d --- install.sh | 58 ++++++++++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 30 deletions(-) diff --git a/install.sh b/install.sh index e056ed9..ca15c6e 100644 --- a/install.sh +++ b/install.sh @@ -31,9 +31,6 @@ echo 1 # Change first partition to EFI system. echo w # write changes. ) | sudo fdisk $driveName -w always -W always -# Move to root -sudo -i - # List the new partitions. lsblk -f @@ -48,63 +45,64 @@ echo "Which is the root partition?" read rootName # Create EFI partition -mkfs.fat -F32 -n EFI $efiName +sudo mkfs.fat -F32 -n EFI $efiName # Encrypt the root partition -cryptsetup luksFormat -v -s 512 -h sha512 $rootName +sudo cryptsetup luksFormat -v -s 512 -h sha512 $rootName # Open the encrypted root partition -cryptsetup luksOpen $rootName crypt-root +sudo cryptsetup luksOpen $rootName crypt-root -pvcreate /dev/mapper/crypt-root -vgcreate lvm /dev/mapper/crypt-root +sudo pvcreate /dev/mapper/crypt-root +sudo vgcreate lvm /dev/mapper/crypt-root -lvcreate --size $ramTotal --name swap lvm -lvcreate --extents 100%FREE --name root lvm +sudo lvcreate --size $ramTotal --name swap lvm +sudo lvcreate --extents 100%FREE --name root lvm -cryptsetup config $rootName --label luks +sudo cryptsetup config $rootName --label luks -mkswap /dev/lvm/swap # swap partition -mkfs.btrfs -L root /dev/lvm/root # /root partition +sudo mkswap /dev/lvm/swap # swap partition +sudo mkfs.btrfs -L root /dev/lvm/root # /root partition # 0. Mount the filesystems. -swapon /dev/lvm/swap -mount /dev/lvm/root /mnt +sudo swapon /dev/lvm/swap +sudo mount /dev/lvm/root /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 -umount /mnt +sudo umount /mnt # Mount the subvolumes. -mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@ /dev/lvm/root /mnt +sudo mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@ /dev/lvm/root /mnt -mkdir /mnt/home/ -mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@home /dev/lvm/root /mnt/home +sudo mkdir /mnt/home/ +sudo mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@home /dev/lvm/root /mnt/home # Mount the EFI partition. -mkdir /mnt/boot/ -mount $efiName /mnt/boot +sudo mkdir /mnt/boot/ +sudo mount $efiName /mnt/boot # Generate Nix configuration -nixos-generate-config --root /mnt +sudo nixos-generate-config --root /mnt curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/nathaniel-btrfs/config-plasma.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ # Install -nixos-install +sudo nixos-install # Start Setup section +sudo -i curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/nathaniel-btrfs/setup.sh > /mntsetup.sh # Enter into installed OS -mount -o bind /dev /mnt/dev -mount -o bind /proc /mnt/proc -mount -o bind /sys /mnt/sys -chroot /mnt /nix/var/nix/profiles/system/activate -chroot /mnt /run/current-system/sw/bin/bash setup.sh +sudo mount -o bind /dev /mnt/dev +sudo mount -o bind /proc /mnt/proc +sudo mount -o bind /sys /mnt/sys +sudo chroot /mnt /nix/var/nix/profiles/system/activate +sudo chroot /mnt /run/current-system/sw/bin/bash setup.sh # Removed install script. rm install.sh From 43513e266e8c3f200923e9e1f24baafc870ad5ad Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sun, 8 May 2022 18:03:08 +0000 Subject: [PATCH 37/63] Update config-plasma.nix --- config-plasma.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config-plasma.nix b/config-plasma.nix index c9bb2c6..8eae37e 100644 --- a/config-plasma.nix +++ b/config-plasma.nix @@ -59,6 +59,7 @@ fish flatpak libsForQt5.plasma-nm + libsForQt5.plasma-pa libsForQt5.discover thunderbird tilix @@ -71,6 +72,15 @@ services.xserver.enable = true; services.xserver.desktopManager.plasma5.enable = true; + # Enable Pipewire + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + # System system.autoUpgrade.enable = true; system.autoUpgrade.allowReboot = true; From 1f9925821d60e57e50a6f81d30d03c8a90785ec2 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sun, 8 May 2022 20:06:42 +0000 Subject: [PATCH 38/63] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index ca15c6e..b22337d 100644 --- a/install.sh +++ b/install.sh @@ -56,7 +56,7 @@ sudo cryptsetup luksOpen $rootName crypt-root sudo pvcreate /dev/mapper/crypt-root sudo vgcreate lvm /dev/mapper/crypt-root -sudo lvcreate --size $ramTotal --name swap lvm +sudo lvcreate --size "$ramTotal"GB --name swap lvm sudo lvcreate --extents 100%FREE --name root lvm sudo cryptsetup config $rootName --label luks From 15c1d6bc1c619d4603280d5666f73674b8a124d6 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sun, 8 May 2022 20:08:31 +0000 Subject: [PATCH 39/63] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index b22337d..9eb30f7 100644 --- a/install.sh +++ b/install.sh @@ -56,7 +56,7 @@ sudo cryptsetup luksOpen $rootName crypt-root sudo pvcreate /dev/mapper/crypt-root sudo vgcreate lvm /dev/mapper/crypt-root -sudo lvcreate --size "$ramTotal"GB --name swap lvm +sudo lvcreate --size "$ramTotal"G --name swap lvm sudo lvcreate --extents 100%FREE --name root lvm sudo cryptsetup config $rootName --label luks From c7e70d1c06071048fa628f7ca8abd4415d0bee4d Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sun, 8 May 2022 20:41:57 +0000 Subject: [PATCH 40/63] Update config-plasma.nix --- config-plasma.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config-plasma.nix b/config-plasma.nix index 8eae37e..5490ffc 100644 --- a/config-plasma.nix +++ b/config-plasma.nix @@ -61,6 +61,7 @@ libsForQt5.plasma-nm libsForQt5.plasma-pa libsForQt5.discover + libsForQt5.sddm thunderbird tilix ]; @@ -70,6 +71,7 @@ # Plasma services.xserver.enable = true; + services.xserver.displayManager.sddm.enable = true; services.xserver.desktopManager.plasma5.enable = true; # Enable Pipewire From 450ec66f9412ad96d3a70cde761ff22327f5f44b Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sun, 8 May 2022 21:30:27 +0000 Subject: [PATCH 41/63] Update config-plasma.nix --- config-plasma.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/config-plasma.nix b/config-plasma.nix index 5490ffc..6c9e7b3 100644 --- a/config-plasma.nix +++ b/config-plasma.nix @@ -58,6 +58,7 @@ firefox fish flatpak + git libsForQt5.plasma-nm libsForQt5.plasma-pa libsForQt5.discover From 6d3ac07511b848c847083ab6351f83f4c1dbe182 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sun, 8 May 2022 21:32:08 +0000 Subject: [PATCH 42/63] Update README.md --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2cf50eb..638a9ca 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ This installer does the following at it's core: - Partition the drive of your choice - Installs a base of NixOS +- Installs Plasma +- Installs needed packages Tested on the following drives: - SATA @@ -32,8 +34,9 @@ The following will happen: - Clear partition table for `/dev/***`. - Creates a GPT partition table for `/dev/***`. - Create a +512M EFI partiton at `/dev/***1`. -- Create a encrypted root partition at `/dev/***2`. -- Create a swap partition at `/dev/***3` with the choice to set it as the same size as the RAM. +- Create a encrypted LVM at `/dev/***2`. +- Create a swap partition in the LVM with the choice to set it as the same size as the RAM. +- Create a root partition in the LVM. - Install systemd-boot. ## After Installation ... From 020d90f38f7e6a22074622b5b3dcc9da9475466a Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 9 May 2022 14:19:14 +0000 Subject: [PATCH 43/63] Update config-plasma.nix --- config-plasma.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config-plasma.nix b/config-plasma.nix index 6c9e7b3..bd8ea95 100644 --- a/config-plasma.nix +++ b/config-plasma.nix @@ -20,6 +20,9 @@ }; }; + # Enable 32 Bit libraries for applications like Steam + hardware.opengl.driSupport32Bit = true; + # Name your host machine networking.hostName = "NixOS-VM"; From 3c9f52d1491fbc82b09896db1d24f5806070a846 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 9 May 2022 15:32:20 +0000 Subject: [PATCH 44/63] Delete config-pantheon.nix --- config-pantheon.nix | 53 --------------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 config-pantheon.nix diff --git a/config-pantheon.nix b/config-pantheon.nix deleted file mode 100644 index 0f86f02..0000000 --- a/config-pantheon.nix +++ /dev/null @@ -1,53 +0,0 @@ -{ config, pkgs, ... }: - -{ - # Import other configuration modules - # (hardware-configuration.nix is autogenerated upon installation) - # paths in nix expressions are always relative the file which defines them - imports = - [ - ./hardware-configuration.nix - ]; - - boot.loader = { - systemd-boot.enable = true; - }; - - # Name your host machine - networking.hostName = "NixOS-VM"; - - # Set your time zone. - time.timeZone = "America/Denver"; - - # Enter keyboard layout - services.xserver.layout = "us"; - - # Define user accounts - users.extraUsers = - { - aaronh = - { - home = "/home/aaronh"; - extraGroups = [ "wheel" "networkmanager" ]; - isNormalUser = true; - }; - }; - - # Install some packages - environment.systemPackages = - with pkgs; - [ - thunderbird - firefox - fish - ]; - - # Enable the OpenSSH daemon - services.openssh.enable = true; - - # Pantheon - services.xserver.enable = true; - services.xserver.desktopManager.pantheon.enable = true; - - -} From e7e3cb1812a387215c55476a59f37ede99b35ad6 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 9 May 2022 15:32:25 +0000 Subject: [PATCH 45/63] Delete configuration.nix --- configuration.nix | 177 ---------------------------------------------- 1 file changed, 177 deletions(-) delete mode 100644 configuration.nix diff --git a/configuration.nix b/configuration.nix deleted file mode 100644 index f81b99b..0000000 --- a/configuration.nix +++ /dev/null @@ -1,177 +0,0 @@ -{ config, pkgs, ... }: - -{ - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix - ]; - - boot = { - blacklistedKernelModules = [ "snd_pcsp" ]; - kernelPackages = pkgs.linuxPackages_latest; - cleanTmpDir = true; - - loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - }; - - supportedFilesystems = [ - "exfat" - ]; - }; - - networking = { - firewall = { - enable = true; - allowedTCPPorts = []; - allowedUDPPorts = []; - }; - hostName = "aya"; - networkmanager.enable = true; - - }; - - console = { - font = "Lat2-Terminus16"; - keyMap = "us"; - }; - - i18n = { - defaultLocale = "en_US.UTF-8"; - } - - services = { - openssh.enable = true; - ntp.enable = true; - nscd.enable = true; - } - xserver = { - videoDrivers = [ "nvidia" ]; - enable = true; - layout = "us"; - - xkbOptions = "compose:caps"; - xkbVariant = "dvp"; - - synaptics.enable = true; - - windowManager.xmonad.enable = true; - windowManager.xmonad.extraPackages = self: [ self.xmonad-contrib ]; - windowManager.xmonad.haskellPackages = pkgs.haskell.packages.ghc822; - displayManager.defaultSession = "none+xmonad"; - - displayManager.lightdm = { - enable = true; - extraSeatDefaults = '' - greeter-show-manual-login=true - greeter-hide-users=true - allow-guest=false - ''; - }; - - displayManager.sessionCommands = '' - ${pkgs.xlibs.xsetroot}/bin/xsetroot -cursor_name left_ptr - ${pkgs.xscreensaver}/bin/xscreensaver -no-splash & - ''; - }; - }; - - users.extraGroups.vboxusers.members = [ "shana" ]; - - programs.ssh.startAgent = true; - programs.bash.enableCompletion = true; - - # Don't blind me - systemd.services.redshift.restartIfChanged = false; - - time.timeZone = "America/Denver"; - - # Users - users.users.aaronh = { - createHome = true; - home = "/home/aaronh"; - description = "Aaron Honeycutt"; - extraGroups = [ "wheel" "audio" "video" "networkmanager" "docker" ]; - useDefaultShell = true; - isNormalUser = true; - }; - - nixpkgs.system = "x86_64-linux"; - nixpkgs.config = { - virtualbox.enableExtensionPack = true; - pulseaudio = true; - allowUnfree = true; - }; - - environment.systemPackages = with pkgs; - [ cacert - cloc - elfutils - file - firefox-devedition-bin - fish - git - glib - glxinfo - gnupg - gnutls - # haskellPackages.apply-refact - # haskellPackages.hasktags - # haskellPackages.hlint - htop - jq - mpv - mupdf - nano - networkmanager - nitrogen - nmap - openssl - p7zip - pavucontrol - # pythonPackages.youtube-dl - # rtorrent - rxvt_unicode - scrot - sxiv - unzip - wget - xlibs.xsetroot - xscreensaver - xsel - zip - ]; - - fonts = { - fontconfig.enable = true; - fontDir.enable = true; - enableGhostscriptFonts = true; - fonts = with pkgs; [ - corefonts - dejavu_fonts - inconsolata - source-han-sans-japanese - source-han-sans-korean - source-han-sans-simplified-chinese - source-han-sans-traditional-chinese - ubuntu_font_family - ]; - }; - - security.sudo.enable = true; - - nix = { - package = pkgs.nixUnstable; - trustedBinaryCaches = [ - "http://cache.nixos.org" - ]; - - binaryCaches = [ - "http://cache.nixos.org" - ]; - - gc.automatic = false; - maxJobs = pkgs.lib.mkForce 6; - }; -} From 7ce29233d4d5c5c760d48820ec8a9602857f25ce Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 9 May 2022 15:32:34 +0000 Subject: [PATCH 46/63] Delete config.nix --- config.nix | 47 ----------------------------------------------- 1 file changed, 47 deletions(-) delete mode 100644 config.nix diff --git a/config.nix b/config.nix deleted file mode 100644 index 656af37..0000000 --- a/config.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ config, pkgs, ... }: - -{ - # Import other configuration modules - # (hardware-configuration.nix is autogenerated upon installation) - # paths in nix expressions are always relative the file which defines them - imports = - [ - ./hardware-configuration.nix - ]; - - boot.loader = { - systemd-boot.enable = true; - }; - - # Name your host machine - networking.hostName = "NixOS-VM"; - - # Set your time zone. - time.timeZone = "America/Denver"; - - # Enter keyboard layout - services.xserver.layout = "us"; - - # Define user accounts - users.extraUsers = - { - aaronh = - { - extraGroups = [ "wheel" "networkmanager" ]; - isNormalUser = true; - }; - }; - - # Install some packages - environment.systemPackages = - with pkgs; - [ - ddate - testdisk - fish - ]; - - # Enable the OpenSSH daemon - services.openssh.enable = true; - -} From 173214093c3ed950a33c745b155d831faa4c4ade Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 9 May 2022 15:34:34 +0000 Subject: [PATCH 47/63] Update config-gnome.nix --- config-gnome.nix | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/config-gnome.nix b/config-gnome.nix index 4f60b4e..b93d1a7 100644 --- a/config-gnome.nix +++ b/config-gnome.nix @@ -13,8 +13,18 @@ systemd-boot.enable = true; }; + boot.initrd.luks.devices = { + crypt-root = { + device = "/dev/disk/by-label/luks"; + preLVM = true; + }; + }; + + # Enable 32 Bit libraries for applications like Steam + hardware.opengl.driSupport32Bit = true; + # Name your host machine - networking.hostName = "NixOS-VM"; + networking.hostName = "NixOS"; # Set your time zone. time.timeZone = "America/Denver"; @@ -22,6 +32,15 @@ # Enter keyboard layout services.xserver.layout = "us"; + # Enable flatpak + services.flatpak.enable = true; + + # Enable PackageKit for Discover + services.packagekit.enable = true; + + # Enable fwupd + services.fwupd.enable = true; + # Define user accounts users.extraUsers = { @@ -37,15 +56,26 @@ environment.systemPackages = with pkgs; [ - thunderbird firefox fish + flatpak + git + thunderbird tilix ]; # Enable the OpenSSH daemon services.openssh.enable = true; + # Enable Pipewire + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + # GNOME services.xserver.enable = true; services.xserver.displayManager.gdm.enable = true; From edc0e8afa0cd4f41652724fce6fbf09942d5263f Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 9 May 2022 15:38:09 +0000 Subject: [PATCH 48/63] Update setup.sh --- setup.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup.sh b/setup.sh index d33731b..a135bd2 100644 --- a/setup.sh +++ b/setup.sh @@ -6,4 +6,8 @@ read userName sudo passwd $userName +# Create Directories +mkdir /home/$userName/Projects +chmod $userName:$userName /home/aaronh/Projects + exit From 7d9fa62fb65f02f5306a25d20464aa2a3e0d7475 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 9 May 2022 15:38:34 +0000 Subject: [PATCH 49/63] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 9eb30f7..ce04fb7 100644 --- a/install.sh +++ b/install.sh @@ -95,7 +95,7 @@ sudo nixos-install # Start Setup section sudo -i -curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/nathaniel-btrfs/setup.sh > /mntsetup.sh +curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/nathaniel-btrfs/setup.sh > /mnt/setup.sh # Enter into installed OS sudo mount -o bind /dev /mnt/dev From c93fc353ca8f9319321b29f2ca3e876cc5d84d1d Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 9 May 2022 15:39:07 +0000 Subject: [PATCH 50/63] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index ce04fb7..d0595de 100644 --- a/install.sh +++ b/install.sh @@ -102,7 +102,7 @@ sudo mount -o bind /dev /mnt/dev sudo mount -o bind /proc /mnt/proc sudo mount -o bind /sys /mnt/sys sudo chroot /mnt /nix/var/nix/profiles/system/activate -sudo chroot /mnt /run/current-system/sw/bin/bash setup.sh +sudo chroot /mnt /run/current-system/sw/bin/sh setup.sh # Removed install script. rm install.sh From c6650b3ba4d9d5e7075e6eb6ecdb0d03237915d7 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 9 May 2022 22:36:44 +0000 Subject: [PATCH 51/63] Update config-plasma.nix --- config-plasma.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config-plasma.nix b/config-plasma.nix index bd8ea95..a486015 100644 --- a/config-plasma.nix +++ b/config-plasma.nix @@ -37,7 +37,7 @@ # Enable flatpak services.flatpak.enable = true; - # Enable PackageKit for Discover + # Enable PackageKit services.packagekit.enable = true; # Enable fwupd @@ -64,7 +64,6 @@ git libsForQt5.plasma-nm libsForQt5.plasma-pa - libsForQt5.discover libsForQt5.sddm thunderbird tilix From a73864479bb7aa5bbedb293a12cbaf2763862686 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 9 May 2022 22:38:24 +0000 Subject: [PATCH 52/63] Update install.sh --- install.sh | 62 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/install.sh b/install.sh index d0595de..bed4a58 100644 --- a/install.sh +++ b/install.sh @@ -2,6 +2,9 @@ # ramTotal=$(grep MemTotal /proc/meminfo | awk '{print $2 / 1024 / 1024}') ramTotal=$(free | awk '/^Mem:/{print $2 / 1024 / 1024}' | awk -F. {'print$1'}) +# Become Root +sudo -i + # Detect and list the drives. lsblk -f @@ -29,7 +32,7 @@ echo t # Change partition type. echo 1 # Pick first partition. echo 1 # Change first partition to EFI system. echo w # write changes. -) | sudo fdisk $driveName -w always -W always +) | fdisk $driveName -w always -W always # List the new partitions. lsblk -f @@ -45,64 +48,63 @@ echo "Which is the root partition?" read rootName # Create EFI partition -sudo mkfs.fat -F32 -n EFI $efiName +mkfs.fat -F32 -n EFI $efiName # Encrypt the root partition -sudo cryptsetup luksFormat -v -s 512 -h sha512 $rootName +cryptsetup luksFormat -v -s 512 -h sha512 $rootName # Open the encrypted root partition -sudo cryptsetup luksOpen $rootName crypt-root +cryptsetup luksOpen $rootName crypt-root -sudo pvcreate /dev/mapper/crypt-root -sudo vgcreate lvm /dev/mapper/crypt-root +pvcreate /dev/mapper/crypt-root +vgcreate lvm /dev/mapper/crypt-root -sudo lvcreate --size "$ramTotal"G --name swap lvm -sudo lvcreate --extents 100%FREE --name root lvm +lvcreate --size "$ramTotal"G --name swap lvm +lvcreate --extents 100%FREE --name root lvm -sudo cryptsetup config $rootName --label luks +cryptsetup config $rootName --label luks -sudo mkswap /dev/lvm/swap # swap partition -sudo mkfs.btrfs -L root /dev/lvm/root # /root partition +mkswap /dev/lvm/swap # swap partition +mkfs.btrfs -L root /dev/lvm/root # /root partition -# 0. Mount the filesystems. -sudo swapon /dev/lvm/swap -sudo mount /dev/lvm/root /mnt +# Mount the filesystems. +swapon /dev/lvm/swap +mount /dev/lvm/root /mnt # Create Subvolumes -sudo btrfs subvolume create /mnt/@ -sudo btrfs subvolume create /mnt/@home +btrfs subvolume create /mnt/@ +btrfs subvolume create /mnt/@home # Unmount root -sudo umount /mnt +umount /mnt # Mount the subvolumes. -sudo mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@ /dev/lvm/root /mnt +mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@ /dev/lvm/root /mnt -sudo mkdir /mnt/home/ -sudo mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@home /dev/lvm/root /mnt/home +mkdir /mnt/home/ +mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@home /dev/lvm/root /mnt/home # Mount the EFI partition. -sudo mkdir /mnt/boot/ -sudo mount $efiName /mnt/boot +mkdir /mnt/boot/ +mount $efiName /mnt/boot # Generate Nix configuration -sudo nixos-generate-config --root /mnt +nixos-generate-config --root /mnt curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/nathaniel-btrfs/config-plasma.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ # Install -sudo nixos-install +nixos-install # Start Setup section -sudo -i curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/nathaniel-btrfs/setup.sh > /mnt/setup.sh # Enter into installed OS -sudo mount -o bind /dev /mnt/dev -sudo mount -o bind /proc /mnt/proc -sudo mount -o bind /sys /mnt/sys -sudo chroot /mnt /nix/var/nix/profiles/system/activate -sudo chroot /mnt /run/current-system/sw/bin/sh setup.sh +mount -o bind /dev /mnt/dev +mount -o bind /proc /mnt/proc +mount -o bind /sys /mnt/sys +chroot /mnt /nix/var/nix/profiles/system/activate +chroot /mnt /run/current-system/sw/bin/sh setup.sh # Removed install script. rm install.sh From 0dfe4b5d6df364abd4e839898b73cee2cf01da3c Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 9 May 2022 22:47:48 +0000 Subject: [PATCH 53/63] Update install.sh --- install.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/install.sh b/install.sh index bed4a58..f9a5a8e 100644 --- a/install.sh +++ b/install.sh @@ -2,9 +2,6 @@ # ramTotal=$(grep MemTotal /proc/meminfo | awk '{print $2 / 1024 / 1024}') ramTotal=$(free | awk '/^Mem:/{print $2 / 1024 / 1024}' | awk -F. {'print$1'}) -# Become Root -sudo -i - # Detect and list the drives. lsblk -f From 30260a1e36580f2f496cb579d90c4bbac8efa536 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 9 May 2022 22:48:36 +0000 Subject: [PATCH 54/63] Revert "Update install.sh" This reverts commit a73864479bb7aa5bbedb293a12cbaf2763862686 --- install.sh | 59 +++++++++++++++++++++++++++--------------------------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/install.sh b/install.sh index f9a5a8e..d0595de 100644 --- a/install.sh +++ b/install.sh @@ -29,7 +29,7 @@ echo t # Change partition type. echo 1 # Pick first partition. echo 1 # Change first partition to EFI system. echo w # write changes. -) | fdisk $driveName -w always -W always +) | sudo fdisk $driveName -w always -W always # List the new partitions. lsblk -f @@ -45,63 +45,64 @@ echo "Which is the root partition?" read rootName # Create EFI partition -mkfs.fat -F32 -n EFI $efiName +sudo mkfs.fat -F32 -n EFI $efiName # Encrypt the root partition -cryptsetup luksFormat -v -s 512 -h sha512 $rootName +sudo cryptsetup luksFormat -v -s 512 -h sha512 $rootName # Open the encrypted root partition -cryptsetup luksOpen $rootName crypt-root +sudo cryptsetup luksOpen $rootName crypt-root -pvcreate /dev/mapper/crypt-root -vgcreate lvm /dev/mapper/crypt-root +sudo pvcreate /dev/mapper/crypt-root +sudo vgcreate lvm /dev/mapper/crypt-root -lvcreate --size "$ramTotal"G --name swap lvm -lvcreate --extents 100%FREE --name root lvm +sudo lvcreate --size "$ramTotal"G --name swap lvm +sudo lvcreate --extents 100%FREE --name root lvm -cryptsetup config $rootName --label luks +sudo cryptsetup config $rootName --label luks -mkswap /dev/lvm/swap # swap partition -mkfs.btrfs -L root /dev/lvm/root # /root partition +sudo mkswap /dev/lvm/swap # swap partition +sudo mkfs.btrfs -L root /dev/lvm/root # /root partition -# Mount the filesystems. -swapon /dev/lvm/swap -mount /dev/lvm/root /mnt +# 0. Mount the filesystems. +sudo swapon /dev/lvm/swap +sudo mount /dev/lvm/root /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 -umount /mnt +sudo umount /mnt # Mount the subvolumes. -mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@ /dev/lvm/root /mnt +sudo mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@ /dev/lvm/root /mnt -mkdir /mnt/home/ -mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@home /dev/lvm/root /mnt/home +sudo mkdir /mnt/home/ +sudo mount -o noatime,commit=120,compress=zstd:10,space_cache,subvol=@home /dev/lvm/root /mnt/home # Mount the EFI partition. -mkdir /mnt/boot/ -mount $efiName /mnt/boot +sudo mkdir /mnt/boot/ +sudo mount $efiName /mnt/boot # Generate Nix configuration -nixos-generate-config --root /mnt +sudo nixos-generate-config --root /mnt curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/nathaniel-btrfs/config-plasma.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ # Install -nixos-install +sudo nixos-install # Start Setup section +sudo -i curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/nathaniel-btrfs/setup.sh > /mnt/setup.sh # Enter into installed OS -mount -o bind /dev /mnt/dev -mount -o bind /proc /mnt/proc -mount -o bind /sys /mnt/sys -chroot /mnt /nix/var/nix/profiles/system/activate -chroot /mnt /run/current-system/sw/bin/sh setup.sh +sudo mount -o bind /dev /mnt/dev +sudo mount -o bind /proc /mnt/proc +sudo mount -o bind /sys /mnt/sys +sudo chroot /mnt /nix/var/nix/profiles/system/activate +sudo chroot /mnt /run/current-system/sw/bin/sh setup.sh # Removed install script. rm install.sh From c6eb72cb020de901c290d26e3038220c3d0f191c Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 9 May 2022 22:54:55 +0000 Subject: [PATCH 55/63] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 638a9ca..03f68d6 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ https://nixos.org/manual/nixos/stable/index.html#sec-installation-booting-networ ## Start the installer ``` -curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/nathaniel-btrfs/install.sh > install.sh; sh install.sh +curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/main/install.sh > install.sh; sh install.sh ``` The following will happen: From b299ea6e7e4a18e234b2cad9805dc8384ae64c9d Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 9 May 2022 22:55:40 +0000 Subject: [PATCH 56/63] Update install.sh --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index d0595de..579f40b 100644 --- a/install.sh +++ b/install.sh @@ -88,14 +88,14 @@ sudo mount $efiName /mnt/boot # Generate Nix configuration sudo nixos-generate-config --root /mnt -curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/nathaniel-btrfs/config-plasma.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ +curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/main/config-plasma.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ # Install sudo nixos-install # Start Setup section -sudo -i -curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/nathaniel-btrfs/setup.sh > /mnt/setup.sh +# sudo -i +# curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/nathaniel-btrfs/setup.sh > /mnt/setup.sh # Enter into installed OS sudo mount -o bind /dev /mnt/dev From 4f7716c767024c6b01c6ab2fee7f554b54a455b3 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 9 May 2022 22:55:50 +0000 Subject: [PATCH 57/63] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 579f40b..a826582 100644 --- a/install.sh +++ b/install.sh @@ -95,7 +95,7 @@ sudo nixos-install # Start Setup section # sudo -i -# curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/nathaniel-btrfs/setup.sh > /mnt/setup.sh +# curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/main/setup.sh > /mnt/setup.sh # Enter into installed OS sudo mount -o bind /dev /mnt/dev From 5d658788023b5a4e7455eaca42b5878ab590bc82 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 9 May 2022 23:22:01 +0000 Subject: [PATCH 58/63] Revert "Update config-plasma.nix" This reverts commit c6650b3ba4d9d5e7075e6eb6ecdb0d03237915d7 --- config-plasma.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config-plasma.nix b/config-plasma.nix index a486015..bd8ea95 100644 --- a/config-plasma.nix +++ b/config-plasma.nix @@ -37,7 +37,7 @@ # Enable flatpak services.flatpak.enable = true; - # Enable PackageKit + # Enable PackageKit for Discover services.packagekit.enable = true; # Enable fwupd @@ -64,6 +64,7 @@ git libsForQt5.plasma-nm libsForQt5.plasma-pa + libsForQt5.discover libsForQt5.sddm thunderbird tilix From c15582048fa1453cfe6b445fe17fca345ed31cb3 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 9 May 2022 23:30:13 +0000 Subject: [PATCH 59/63] Update config-plasma.nix --- config-plasma.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config-plasma.nix b/config-plasma.nix index bd8ea95..0e595ee 100644 --- a/config-plasma.nix +++ b/config-plasma.nix @@ -87,6 +87,9 @@ pulse.enable = true; }; + # Enable CUPS + services.printing.enable = true; + # System system.autoUpgrade.enable = true; system.autoUpgrade.allowReboot = true; From 1b0c2952c1c273769365cebdfc6f22f07dbf95e1 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 9 May 2022 23:31:41 +0000 Subject: [PATCH 60/63] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index a826582..31e1479 100644 --- a/install.sh +++ b/install.sh @@ -88,7 +88,7 @@ sudo mount $efiName /mnt/boot # Generate Nix configuration sudo nixos-generate-config --root /mnt -curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/main/config-plasma.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ +curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/main/config-gnome.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ # Install sudo nixos-install From a865fa5b35aafe74754f35dcace2f13558e985b5 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 9 May 2022 23:32:44 +0000 Subject: [PATCH 61/63] Update config-plasma.nix --- config-plasma.nix | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/config-plasma.nix b/config-plasma.nix index 0e595ee..a982e0e 100644 --- a/config-plasma.nix +++ b/config-plasma.nix @@ -24,9 +24,7 @@ hardware.opengl.driSupport32Bit = true; # Name your host machine - networking.hostName = "NixOS-VM"; - - networking.networkmanager.enable = true; + networking.hostName = "NixOS"; # Set your time zone. time.timeZone = "America/Denver"; @@ -62,10 +60,6 @@ fish flatpak git - libsForQt5.plasma-nm - libsForQt5.plasma-pa - libsForQt5.discover - libsForQt5.sddm thunderbird tilix ]; @@ -73,11 +67,6 @@ # Enable the OpenSSH daemon services.openssh.enable = true; - # Plasma - services.xserver.enable = true; - services.xserver.displayManager.sddm.enable = true; - services.xserver.desktopManager.plasma5.enable = true; - # Enable Pipewire security.rtkit.enable = true; services.pipewire = { From 9985b0e52f59db8e00456cb30bd288a94775fbac Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 9 May 2022 23:38:05 +0000 Subject: [PATCH 62/63] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 31e1479..0069b4f 100644 --- a/install.sh +++ b/install.sh @@ -88,7 +88,7 @@ sudo mount $efiName /mnt/boot # Generate Nix configuration sudo nixos-generate-config --root /mnt -curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/main/config-gnome.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ +curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/nathaniel-btrfs/config-plasma.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ # Install sudo nixos-install From 78376d61f47e7dfbaa5fcca57ed4e7d8c2863530 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 9 May 2022 23:41:40 +0000 Subject: [PATCH 63/63] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 0069b4f..a826582 100644 --- a/install.sh +++ b/install.sh @@ -88,7 +88,7 @@ sudo mount $efiName /mnt/boot # Generate Nix configuration sudo nixos-generate-config --root /mnt -curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/nathaniel-btrfs/config-plasma.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ +curl https://gitlab.com/ahoneybun/nixos-cli-installer/-/raw/main/config-plasma.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/ # Install sudo nixos-install