From 741b82a10d119ac002f73f0233de895a2bc3c9d9 Mon Sep 17 00:00:00 2001 From: TheWanderingCrow Date: Tue, 30 Dec 2025 20:54:18 -0500 Subject: [PATCH] enable auto gc --- hosts/common/core/default.nix | 47 ++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/hosts/common/core/default.nix b/hosts/common/core/default.nix index 68d2442..f90e60c 100644 --- a/hosts/common/core/default.nix +++ b/hosts/common/core/default.nix @@ -63,28 +63,35 @@ in virtualisation.oci-containers.backend = lib.mkDefault "podman"; - nix.settings = { - connect-timeout = 5; - log-lines = 25; - min-free = 128000000; - max-free = 1000000000; + nix = { + settings = { + connect-timeout = 5; + log-lines = 25; + min-free = 128000000; + max-free = 1000000000; - experimental-features = [ - "nix-command" - "flakes" - ]; + experimental-features = [ + "nix-command" + "flakes" + ]; - fallback = true; - auto-optimise-store = true; + fallback = true; + auto-optimise-store = true; - trusted-users = [ "@wheel" ]; - substituters = [ - "https://cache.nixos.org/" - "https://nix-community.cachix.org" - ]; - trusted-public-keys = [ - "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - ]; + trusted-users = [ "@wheel" ]; + substituters = [ + "https://cache.nixos.org/" + "https://nix-community.cachix.org" + ]; + trusted-public-keys = [ + "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + ]; + }; + # Automatic garbage collect + gc = { + automatic = true; + dates = "weekly"; + }; }; }