From 4c100acb272d7b52f610e23fafec43c057d061cc Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 26 Aug 2024 10:14:03 +0200 Subject: [PATCH 1/2] fix: remove extraneous newlines in hardware-configuration.nix Removed unnecessary blank lines to improve readability and maintain consistency with the formatting guidelines. This change does not impact functionality but cleans up the code. --- systems/x86_64-linux/mx/hardware-configuration.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/systems/x86_64-linux/mx/hardware-configuration.nix b/systems/x86_64-linux/mx/hardware-configuration.nix index beac65e..756683b 100644 --- a/systems/x86_64-linux/mx/hardware-configuration.nix +++ b/systems/x86_64-linux/mx/hardware-configuration.nix @@ -39,7 +39,4 @@ }; swapDevices = [{ device = "/swapfile"; }]; - - - } From 15963f055467da3b229db80b66dbdf197ea8ef49 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 26 Aug 2024 10:14:18 +0200 Subject: [PATCH 2/2] feat: enable discard support for LUKS devices Updated LUKS device configurations to include allowDiscards option. This allows the system to send discard/TRIM commands to LUKS devices for better performance. --- systems/x86_64-linux/x1/hardware-configuration.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/systems/x86_64-linux/x1/hardware-configuration.nix b/systems/x86_64-linux/x1/hardware-configuration.nix index cad1c30..1640ae6 100644 --- a/systems/x86_64-linux/x1/hardware-configuration.nix +++ b/systems/x86_64-linux/x1/hardware-configuration.nix @@ -31,8 +31,15 @@ options = [ "subvol=@" ]; }; - boot.initrd.luks.devices."luks-0e2792db-1b80-49a7-b2eb-54e4b5fc3502".device = "/dev/disk/by-uuid/0e2792db-1b80-49a7-b2eb-54e4b5fc3502"; - boot.initrd.luks.devices."luks-280f2e07-e5fc-478e-b7ee-445c99bea415".device = "/dev/disk/by-uuid/280f2e07-e5fc-478e-b7ee-445c99bea415"; + boot.initrd.luks.devices."luks-0e2792db-1b80-49a7-b2eb-54e4b5fc3502" = { + device = "/dev/disk/by-uuid/0e2792db-1b80-49a7-b2eb-54e4b5fc3502"; + allowDiscards = true; + }; + + boot.initrd.luks.devices."luks-280f2e07-e5fc-478e-b7ee-445c99bea415" = { + device = "/dev/disk/by-uuid/280f2e07-e5fc-478e-b7ee-445c99bea415"; + allowDiscards = true; + }; fileSystems."/boot" = {