From ce0a630a0c7f20768e89215259ca690767b0a748 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 18 Feb 2025 16:29:12 +0000 Subject: [PATCH 1/7] Add new file --- partitions/luks-lvm.nix | 73 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 partitions/luks-lvm.nix diff --git a/partitions/luks-lvm.nix b/partitions/luks-lvm.nix new file mode 100644 index 0000000..b95de8f --- /dev/null +++ b/partitions/luks-lvm.nix @@ -0,0 +1,73 @@ +{ + disko.devices = { + disk = { + main = { + type = "disk"; + device = "/dev/sda"; + content = { + type = "gpt"; + partitions = { + ESP = { + size = "500M"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; + }; + luks = { + size = "100%"; + content = { + type = "luks"; + name = "crypted"; + extraOpenArgs = [ ]; + settings = { + # if you want to use the key for interactive login be sure there is no trailing newline + # for example use `echo -n "password" > /tmp/secret.key` + keyFile = "/tmp/secret.key"; + allowDiscards = true; + }; + additionalKeyFiles = [ "/tmp/additionalSecret.key" ]; + content = { + type = "lvm_pv"; + vg = "pool"; + }; + }; + }; + }; + }; + }; + }; + lvm_vg = { + pool = { + type = "lvm_vg"; + lvs = { + root = { + size = "100%"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + mountOptions = [ + "defaults" + ]; + }; + }; + home = { + size = "10M"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/home"; + }; + }; + raw = { + size = "10M"; + }; + }; + }; + }; + }; +} \ No newline at end of file From 144939bb98fc3276028f66bc7d0f78f3496f2654 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 18 Feb 2025 16:48:40 +0000 Subject: [PATCH 2/7] up the EFI partition from 500MB to 1GB --- partitions/luks-lvm.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/partitions/luks-lvm.nix b/partitions/luks-lvm.nix index b95de8f..77fe411 100644 --- a/partitions/luks-lvm.nix +++ b/partitions/luks-lvm.nix @@ -8,7 +8,7 @@ type = "gpt"; partitions = { ESP = { - size = "500M"; + size = "1G"; type = "EF00"; content = { type = "filesystem"; From 9515e7a2169ad678bcf680c7f91607894a1c2535 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 18 Feb 2025 16:58:02 +0000 Subject: [PATCH 3/7] luks-lvm.nix : disable keyfile --- partitions/luks-lvm.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/partitions/luks-lvm.nix b/partitions/luks-lvm.nix index 77fe411..5b107b9 100644 --- a/partitions/luks-lvm.nix +++ b/partitions/luks-lvm.nix @@ -26,10 +26,9 @@ settings = { # if you want to use the key for interactive login be sure there is no trailing newline # for example use `echo -n "password" > /tmp/secret.key` - keyFile = "/tmp/secret.key"; + #keyFile = "/tmp/secret.key"; allowDiscards = true; }; - additionalKeyFiles = [ "/tmp/additionalSecret.key" ]; content = { type = "lvm_pv"; vg = "pool"; From 120d2a2336225e546b8d93891c9b6c4626330335 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 18 Feb 2025 17:11:21 +0000 Subject: [PATCH 4/7] fix spacing --- configuration.nix | 52 ++++++++++++++++++++++------------------------- 1 file changed, 24 insertions(+), 28 deletions(-) diff --git a/configuration.nix b/configuration.nix index 43cea1d..aa7ead7 100644 --- a/configuration.nix +++ b/configuration.nix @@ -45,11 +45,11 @@ # Define user accounts users.users.aaronh = { - description = "Aaron Honeycutt"; - home = "/home/aaronh"; - extraGroups = [ "wheel" "networkmanager" "adm"]; - isNormalUser = true; - hashedPassword = "$6$aAcbLtqiqzySifls$jdKMOQjoWITHD/dWNNZVUH/qNc6aoJ7v4zYofi0U7IJSVTbmOfChS3mzaJbp57AodjdPNKPrnrip8Nlh2Qanx."; + description = "Aaron Honeycutt"; + home = "/home/aaronh"; + extraGroups = [ "wheel" "networkmanager" "adm"]; + isNormalUser = true; + hashedPassword = "$6$aAcbLtqiqzySifls$jdKMOQjoWITHD/dWNNZVUH/qNc6aoJ7v4zYofi0U7IJSVTbmOfChS3mzaJbp57AodjdPNKPrnrip8Nlh2Qanx."; }; @@ -58,29 +58,25 @@ # Install some packages environment.systemPackages = - with pkgs; - [ - avahi - dmidecode - fira - firefox - git - git-lfs - helix - libcamera - lshw - restic - roboto-slab - syncthing - nvd - unzip - wget - xz - zlib - - # Packages from Flake Inputs - #inputs.nix-software-center.packages.${system}.nix-software-center - ]; + with pkgs; + [ + avahi + dmidecode + fira + firefox + git + git-lfs + helix + libcamera + lshw + restic + roboto-slab + nvd + unzip + wget + xz + zlib + ]; # Enable/Disable hardware ## Turn off PulseAudio From c3c0917a7bdc1f6472eec95f96bb3206faf220a3 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 18 Feb 2025 17:13:54 +0000 Subject: [PATCH 5/7] turn off plymouth for VMs --- hosts/x86_64/vm/configuration.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/hosts/x86_64/vm/configuration.nix b/hosts/x86_64/vm/configuration.nix index 7d9979c..ccf12a0 100644 --- a/hosts/x86_64/vm/configuration.nix +++ b/hosts/x86_64/vm/configuration.nix @@ -3,6 +3,7 @@ { # Add kernel parameters for virtual machines boot.kernelParams = [ "vfio-pci.ids=8086:9b41" "qxl" "bochs_drm"]; + boot.plymouth.enable = false; networking.hostName = "vm"; } From c64c47303f16bd13f676d51ac608743af1167718 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 18 Feb 2025 10:19:42 -0700 Subject: [PATCH 6/7] it did not like having different values --- hosts/x86_64/vm/configuration.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/hosts/x86_64/vm/configuration.nix b/hosts/x86_64/vm/configuration.nix index ccf12a0..7d9979c 100644 --- a/hosts/x86_64/vm/configuration.nix +++ b/hosts/x86_64/vm/configuration.nix @@ -3,7 +3,6 @@ { # Add kernel parameters for virtual machines boot.kernelParams = [ "vfio-pci.ids=8086:9b41" "qxl" "bochs_drm"]; - boot.plymouth.enable = false; networking.hostName = "vm"; } From f201dc75a56b1af623a85823de03c89fb452e4bc Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Tue, 18 Feb 2025 17:29:20 +0000 Subject: [PATCH 7/7] add gnome to nixos device --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index b3959f7..8718246 100644 --- a/flake.nix +++ b/flake.nix @@ -27,6 +27,7 @@ # Add Disko for disk management disko.nixosModules.disko ./disko-config.nix + ./gnome.nix ./configuration.nix ./hardware-configuration.nix ];