about summary refs log tree commit diff
path: root/users/tazjin
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-09-10T11·34+0300
committertazjin <mail@tazj.in>2021-09-10T11·37+0000
commit6e8b6b33741a2fe267c99c9862e7299ca3703729 (patch)
treedac00e19db42ed3145113fbda6f9bae5caeda210 /users/tazjin
parent5e08f9b6c642e9d60a6e4589e2e280ed1122f9e0 (diff)
feat(tverskoy): Enable services.depot.automatic-gc r/2836
Change-Id: I5268ea93cf9727ad7fc1beedf9ec72a9d9e6eae8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3526
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
Diffstat (limited to 'users/tazjin')
-rw-r--r--users/tazjin/nixos/tverskoy/default.nix10
1 files changed, 10 insertions, 0 deletions
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