From dd4e2c62aa927a76e35098d508e892ee5b1e0903 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Mon, 15 Apr 2024 11:36:14 +0200 Subject: [PATCH] feat(infra): Make the gc run weekly --- hive.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/hive.nix b/hive.nix index 84bd7b4..98e7fcf 100644 --- a/hive.nix +++ b/hive.nix @@ -75,9 +75,17 @@ in # Deployment config is specified in meta.nodes.${node}.deployment inherit (meta.nodes.${name}) deployment; - # Set NIX_PATH to the patched version of nixpkgs - nix.nixPath = [ "nixpkgs=${mkNixpkgs' (version name)}" ]; - nix.optimise.automatic = true; + nix = { + # Set NIX_PATH to the patched version of nixpkgs + nixPath = [ "nixpkgs=${mkNixpkgs' (version name)}" ]; + optimise.automatic = true; + + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 7d"; + }; + }; # Allow unfree packages nixpkgs.config.allowUnfree = true;