From a83ad0f2eb709fbcf6860c746654dca35ab42661 Mon Sep 17 00:00:00 2001 From: Christoph Cullmann Date: Sat, 24 Aug 2024 18:38:21 +0200 Subject: allowDiscards on luks --- beta/hardware-configuration.nix | 5 ++++- mini/hardware-configuration.nix | 10 ++++++++-- neko/hardware-configuration.nix | 15 ++++++++++++--- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/beta/hardware-configuration.nix b/beta/hardware-configuration.nix index 4f4155d..215e221 100644 --- a/beta/hardware-configuration.nix +++ b/beta/hardware-configuration.nix @@ -19,7 +19,10 @@ }; # /nix encrypted btrfs for the remaining space - boot.initrd.luks.devices."crypt0".device = "/dev/disk/by-id/nvme-SAMSUNG_MZVLB1T0HBLR-000L2_S4DZNX0R362286-part2"; + boot.initrd.luks.devices."crypt0" = { + device = "/dev/disk/by-id/nvme-SAMSUNG_MZVLB1T0HBLR-000L2_S4DZNX0R362286-part2"; + allowDiscards = true; + }; fileSystems."/nix" = { device = "/dev/mapper/crypt0"; fsType = "btrfs"; diff --git a/mini/hardware-configuration.nix b/mini/hardware-configuration.nix index 368766f..2f837f3 100644 --- a/mini/hardware-configuration.nix +++ b/mini/hardware-configuration.nix @@ -19,8 +19,14 @@ }; # /nix encrypted btrfs for the remaining space - boot.initrd.luks.devices."crypt0".device = "/dev/disk/by-id/nvme-CT4000P3PSSD8_2325E6E63746-part2"; - boot.initrd.luks.devices."crypt1".device = "/dev/disk/by-id/ata-CT2000MX500SSD1_2138E5D5061F"; + boot.initrd.luks.devices."crypt0" = { + device = "/dev/disk/by-id/nvme-CT4000P3PSSD8_2325E6E63746-part2"; + allowDiscards = true; + }; + boot.initrd.luks.devices."crypt1" = { + device = "/dev/disk/by-id/ata-CT2000MX500SSD1_2138E5D5061F"; + allowDiscards = true; + }; fileSystems."/nix" = { device = "/dev/mapper/crypt0"; fsType = "btrfs"; diff --git a/neko/hardware-configuration.nix b/neko/hardware-configuration.nix index 60f0994..86705cb 100644 --- a/neko/hardware-configuration.nix +++ b/neko/hardware-configuration.nix @@ -19,9 +19,18 @@ }; # /nix encrypted btrfs for the remaining space - boot.initrd.luks.devices."crypt0".device = "/dev/disk/by-id/nvme-Seagate_FireCuda_530_ZP4000GM30013_7VS01VBM-part2"; - boot.initrd.luks.devices."crypt1".device = "/dev/disk/by-id/nvme-CT2000P5PSSD8_213330E4ED05"; - boot.initrd.luks.devices."crypt2".device = "/dev/disk/by-id/nvme-Samsung_SSD_980_PRO_2TB_S69ENF0R846614L"; + boot.initrd.luks.devices."crypt0" = { + device = "/dev/disk/by-id/nvme-Seagate_FireCuda_530_ZP4000GM30013_7VS01VBM-part2"; + allowDiscards = true; + }; + boot.initrd.luks.devices."crypt1" = { + device = "/dev/disk/by-id/nvme-CT2000P5PSSD8_213330E4ED05"; + allowDiscards = true; + }; + boot.initrd.luks.devices."crypt2" = { + device = "/dev/disk/by-id/nvme-Samsung_SSD_980_PRO_2TB_S69ENF0R846614L"; + allowDiscards = true; + }; fileSystems."/nix" = { device = "/dev/mapper/crypt0"; fsType = "btrfs"; -- cgit v1.2.3