diff --git a/hosts/argon/configuration.nix b/hosts/argon/configuration.nix index f12c342..d67967b 100644 --- a/hosts/argon/configuration.nix +++ b/hosts/argon/configuration.nix @@ -51,6 +51,8 @@ in boot.initrd.luks.devices = lib.mapAttrs (name: uuid: { device = "/dev/disk/by-uuid/${uuid}"; keyFile = key name; + # trim for ssds, ignored by drives without discard support + allowDiscards = true; }) drives; fileSystems = lib.mapAttrs' ( name: _: diff --git a/hosts/argon/hardware-configuration.nix b/hosts/argon/hardware-configuration.nix index cb58a66..69686bf 100644 --- a/hosts/argon/hardware-configuration.nix +++ b/hosts/argon/hardware-configuration.nix @@ -22,18 +22,21 @@ "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ "dm-crypt dm-mod" ]; - boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-label/nixcrypt"; + boot.initrd.luks.devices."cryptroot" = { + device = "/dev/disk/by-label/nixcrypt"; + allowDiscards = true; + bypassWorkqueues = true; + }; boot.kernelModules = [ ]; boot.extraModulePackages = [ ]; fileSystems."/" = { - device = "/dev/mapper/lvmroot-root"; + device = "/dev/disk/by-label/nixroot"; fsType = "ext4"; }; fileSystems."/boot" = { - device = "/dev/disk/by-uuid/AC1C-20EB"; + device = "/dev/disk/by-label/nixboot"; fsType = "vfat"; options = [ "fmask=0022" @@ -42,12 +45,12 @@ }; fileSystems."/home" = { - device = "/dev/mapper/lvmroot-home"; + device = "/dev/disk/by-label/nixhome"; fsType = "ext4"; }; swapDevices = [ - { device = "/dev/mapper/lvmroot-swap"; } + { device = "/dev/disk/by-label/nixswap"; } ]; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";