Enable TRIM on x86 hardware

This commit is contained in:
Andreas Zweili 2024-01-09 18:56:16 +01:00
parent 089864eb34
commit 5bec39e709
2 changed files with 14 additions and 3 deletions

View File

@ -22,7 +22,10 @@
boot.extraModulePackages = [ ];
boot.kernelParams = [ ];
boot.initrd.luks.devices."cryptlvm".device = "/dev/nvme0n1p2";
boot.initrd.luks.devices."cryptlvm" = {
allowDiscards = true;
device = "/dev/nvme0n1p2";
};
# Required to build aarch64 packages
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
@ -63,6 +66,7 @@
az-restic-client-desktop.enable = true;
az-tlp.enable = true;
az-x86.enable = true;
fstrim.enable = true; # Enable TRIM for SD cards
hardware.bolt.enable = true; # Enable Thunderbolt control
logind.lidSwitchExternalPower = "ignore";
};

View File

@ -11,8 +11,14 @@
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.kernelParams = [ "acpi_osi=" ];
boot.initrd.luks.devices."cryptlvm".device = "/dev/sda2";
boot.initrd.luks.devices."cryptswap".device = "/dev/sda3";
boot.initrd.luks.devices."cryptlvm" = {
allowDiscards = true;
device = "/dev/sda2";
};
boot.initrd.luks.devices."cryptswap" = {
allowDiscards = true;
device = "/dev/sda3";
};
boot.loader.efi.efiSysMountPoint = "/boot/efi";
@ -45,6 +51,7 @@
az-restic-client-desktop.enable = true;
az-tlp.enable = true;
az-x86.enable = true;
fstrim.enable = true; # Enable TRIM for SD cards
};
virtualisation.virtualbox.host.enable = true;
}