From 55606b41cc246b8e4b832fcf769aeec569ce5696 Mon Sep 17 00:00:00 2001 From: fleaz Date: Sun, 25 Jun 2023 01:06:46 +0200 Subject: [PATCH] all: Add allowDiscards to LUKS and enable weekly fstrim --- modules/luks.nix | 1 + roles/all.nix | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/luks.nix b/modules/luks.nix index b5cd16c..7822853 100644 --- a/modules/luks.nix +++ b/modules/luks.nix @@ -8,6 +8,7 @@ in boot.initrd.luks.devices."cryptroot" = { fallbackToPassword = true; keyFile = secretsFile; + allowDiscards = true; # Allow TRIM }; # copy the secret into the additional initramfs. `null` means same path diff --git a/roles/all.nix b/roles/all.nix index 0ae7c81..b772a68 100644 --- a/roles/all.nix +++ b/roles/all.nix @@ -47,7 +47,6 @@ in PATH = "$PATH:/home/fleaz/bin"; XDG_SCREENSHOTS_DIR = "/home/fleaz/screenshots/"; DEFAULT_BROWSER = "${pkgs.firefox}/bin/firefox"; - }; console.font = consoleFont config.my.highDPI; @@ -58,6 +57,9 @@ in options = "--delete-older-than 30d"; }; + # weekly trim + services.fstrim.enable = true; + networking.extraHosts = '' ''; }