From 15963f055467da3b229db80b66dbdf197ea8ef49 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 26 Aug 2024 10:14:18 +0200 Subject: [PATCH] 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" = {