From 2968f5396deb1c873e2f172dc4a8250d466377d2 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 7 Nov 2023 00:07:24 +0000 Subject: [PATCH] feat(nixos): configure garbage collection and ...optimisation --- system/nixos/configuration.nix | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/system/nixos/configuration.nix b/system/nixos/configuration.nix index e301085..2c9264d 100644 --- a/system/nixos/configuration.nix +++ b/system/nixos/configuration.nix @@ -199,16 +199,20 @@ in zramSwap.enable = true; - nix.settings = { - warn-dirty = false; - auto-optimise-store = true; - experimental-features = [ "nix-command" "flakes" ]; - }; + nix = { + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 30d"; + }; - nix.gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 30d"; + optimise.automatic = true; + + settings = { + auto-optimise-store = true; + experimental-features = [ "nix-command" "flakes" ]; + warn-dirty = false; + }; }; # Make Caps lock work as an Escape key on press and Ctrl on hold.