diff --git a/modules/linux/core/default.nix b/modules/linux/core/default.nix index 5de3c26..0ce228c 100644 --- a/modules/linux/core/default.nix +++ b/modules/linux/core/default.nix @@ -28,5 +28,16 @@ "nix-command" "flakes" ]; + optimise.automatic = true; + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 14d"; + }; + # Free up to 1GiB when there is less than 100MiB left + extraOptions = '' + min-free = ${toString (100 * 1024 * 1024)} + max-free = ${toString (1024 * 1024 * 1024)} + ''; }; }