From 6e8b6b33741a2fe267c99c9862e7299ca3703729 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Fri, 10 Sep 2021 14:34:10 +0300 Subject: feat(tverskoy): Enable services.depot.automatic-gc Change-Id: I5268ea93cf9727ad7fc1beedf9ec72a9d9e6eae8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3526 Reviewed-by: tazjin Tested-by: BuildkiteCI --- users/tazjin/nixos/tverskoy/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/users/tazjin/nixos/tverskoy/default.nix b/users/tazjin/nixos/tverskoy/default.nix index d8829b2ecf55..e86b20fc3fc2 100644 --- a/users/tazjin/nixos/tverskoy/default.nix +++ b/users/tazjin/nixos/tverskoy/default.nix @@ -18,6 +18,7 @@ config: let in lib.fix(self: { imports = [ "${depot.third_party.impermanence}/nixos.nix" + "${depot.path + "/ops/modules/automatic-gc.nix"}" "${pkgs.home-manager.src}/nixos" ]; @@ -181,6 +182,15 @@ in lib.fix(self: { start = "${depot.users.tazjin.emacs}/bin/tazjins-emacs"; }; }; + + # Automatically collect garbage from the Nix store. + depot.automatic-gc = { + enable = true; + interval = "1 hour"; + diskThreshold = 42; # GiB + maxFreed = 100; # GiB + preserveGenerations = "14d"; + }; }; # Automatically detect location to use for redshift -- cgit 1.4.1