From b2ecd969fd980787fbd8ccdd250208759f308f67 Mon Sep 17 00:00:00 2001 From: Sravan Balaji Date: Sat, 30 Mar 2024 16:38:59 -0400 Subject: [PATCH] Fix Disko Config for Current System and Fix dwm polybar override - Restore luks-btrfs-subvolumes.nix to old subvolume / swap size - Make a copy of modified luks-btrfs-subvolumes.nix for future use - Disable the polybar patch step which doesn't work - Add git as a build input for polybar-dwm-module --- disko/luks-btrfs-subvolumes-new.nix | 77 +++++++++++++++++++++++++++++ disko/luks-btrfs-subvolumes.nix | 24 +++------ system/gui/dwm.nix | 3 ++ 3 files changed, 88 insertions(+), 16 deletions(-) create mode 100644 disko/luks-btrfs-subvolumes-new.nix diff --git a/disko/luks-btrfs-subvolumes-new.nix b/disko/luks-btrfs-subvolumes-new.nix new file mode 100644 index 0000000..59a87dc --- /dev/null +++ b/disko/luks-btrfs-subvolumes-new.nix @@ -0,0 +1,77 @@ +let + installDisk = "sda"; + bootPartitionSize = "512M"; + swapfileSize = "10G"; +in { + disko.devices = { + disk = { + main = { + type = "disk"; + device = "/dev/" + installDisk; + content = { + type = "gpt"; + partitions = { + boot = { + size = "1M"; + type = "EF02"; # for grub MBR + }; + ESP = { + size = bootPartitionSize; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ + "defaults" + ]; + }; + }; + luks = { + size = "100%"; + content = { + type = "luks"; + name = "cryptroot"; + settings.allowDiscards = true; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + "@root" = { + mountpoint = "/"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; + "@home" = { + mountpoint = "/home"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; + "@games" = { + mountpoint = "/games"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; + "@nix" = { + mountpoint = "/nix"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; + "@log" = { + mountpoint = "/var/log"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; + "@swap" = { + mountpoint = "/swap"; + swap.swapfile.size = swapfileSize; + }; + "@.snapshots" = { + mountpoint = "/.snapshots"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/disko/luks-btrfs-subvolumes.nix b/disko/luks-btrfs-subvolumes.nix index 59a87dc..febaed3 100644 --- a/disko/luks-btrfs-subvolumes.nix +++ b/disko/luks-btrfs-subvolumes.nix @@ -1,7 +1,7 @@ let installDisk = "sda"; bootPartitionSize = "512M"; - swapfileSize = "10G"; + swapfileSize = "34G"; in { disko.devices = { disk = { @@ -37,34 +37,26 @@ in { type = "btrfs"; extraArgs = [ "-f" ]; subvolumes = { - "@root" = { + "@" = { mountpoint = "/"; - mountOptions = [ "compress=zstd" "noatime" ]; + mountOptions = [ "compress=zstd" "noatime" "discard=async" "space_cache=v2" "ssd" ]; }; "@home" = { mountpoint = "/home"; - mountOptions = [ "compress=zstd" "noatime" ]; + mountOptions = [ "compress=zstd" "noatime" "discard=async" "space_cache=v2" "ssd" ]; }; - "@games" = { - mountpoint = "/games"; - mountOptions = [ "compress=zstd" "noatime" ]; + "@.snapshots" = { + mountpoint = "/.snapshots"; + mountOptions = [ "compress=zstd" "noatime" "discard=async" "space_cache=v2" "ssd" ]; }; "@nix" = { mountpoint = "/nix"; - mountOptions = [ "compress=zstd" "noatime" ]; - }; - "@log" = { - mountpoint = "/var/log"; - mountOptions = [ "compress=zstd" "noatime" ]; + mountOptions = [ "compress=zstd" "noatime" "discard=async" "space_cache=v2" "ssd" ]; }; "@swap" = { mountpoint = "/swap"; swap.swapfile.size = swapfileSize; }; - "@.snapshots" = { - mountpoint = "/.snapshots"; - mountOptions = [ "compress=zstd" "noatime" ]; - }; }; }; }; diff --git a/system/gui/dwm.nix b/system/gui/dwm.nix index 5e981be..c7e3aff 100644 --- a/system/gui/dwm.nix +++ b/system/gui/dwm.nix @@ -58,7 +58,10 @@ buildInputs = previousAttrs.buildInputs ++ [ jsoncpp + git ]; + + patches = []; })) ]; }