summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2019-07-23 09:04:03 +0100
committerJörg Thalheim <joerg@thalheim.io>2019-07-23 09:04:03 +0100
commite1a10b1536ad7df486edb45d621521c96bc510af (patch)
tree111cd86dedc0f541703068c4068d03379b515c04 /common
parent54268d11ae4e7a35e6085c5561a8d585379e5c73 (diff)
enable fstrim on SSDs
This will run TRIM once a week using a systemd timer. Running TRIM regularly will improves the performance and increases the SSDs lifespan. Since it is based on the utillinux no additional package is required.
Diffstat (limited to 'common')
-rw-r--r--common/pc/ssd/default.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/pc/ssd/default.nix b/common/pc/ssd/default.nix
index af0b495..00922e6 100644
--- a/common/pc/ssd/default.nix
+++ b/common/pc/ssd/default.nix
@@ -4,4 +4,6 @@
boot.kernel.sysctl = {
"vm.swappiness" = lib.mkDefault 1;
};
+
+ services.fstrim.enable = lib.mkDefault true;
}