From ed8a392ba94613bafc439d9bfdab4e5870235471 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Mon, 4 Sep 2023 09:00:09 +0100 Subject: [PATCH] Enable automatic store optimisation Update automatic gc --- hosts/common.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/hosts/common.nix b/hosts/common.nix index 169e82d1..2a768517 100644 --- a/hosts/common.nix +++ b/hosts/common.nix @@ -2,15 +2,20 @@ let flakeURL = "git+https://git.xenia.me.uk/xenia/nixos.git?ref=main"; in { nix = { - settings.experimental-features = [ "nix-command" "flakes" ]; + settings = { + experimental-features = [ "nix-command" "flakes" ]; + auto-optimise-store = true; + }; gc = { automatic = true; - dates = "daily"; - options = "--delete-older-than 7d"; + dates = "weekly"; + options = "--delete-older-than 30d"; }; extraOptions = '' keep-outputs = true keep-derivations = true + min-free = ${toString (100 * 1024 * 1024)} + max-free = ${toString (1024 * 1024 * 1024)} ''; }; system.autoUpgrade.flake = flakeURL;