From 9dcf54d963d8d0a343ccceb73f32e057dc76d221 Mon Sep 17 00:00:00 2001 From: Stefan Ellmauthaler Date: Wed, 17 Nov 2021 14:28:16 +0100 Subject: [PATCH] GC added automatic, persistent garbage collection Signed-off-by: Stefan Ellmauthaler --- baseconfiguration.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/baseconfiguration.nix b/baseconfiguration.nix index f848887..06f1b1c 100644 --- a/baseconfiguration.nix +++ b/baseconfiguration.nix @@ -39,6 +39,17 @@ extraOptions = '' experimental-features = nix-command flakes ''; + gc = { + automatic = true; + persistent = true; + dates = "weekly"; + options = "--delete-older-than 30d"; + }; + # Free up to 50GiB whenever there is less than 10GiB left. + extraOptions = '' + min-free = ${toString (10 * 1024 * 1024 * 1024)} + max-free = ${toString (50 * 1024 * 1024 * 1024)} + ''; }; nixpkgs = {