From 055af0cc4421732f3d5a695082ec34f178f7e5dc Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Fri, 29 Aug 2025 12:42:47 +0530 Subject: chore(os/common/nix): enable automatic gc --- os/common/modules/nix.nix | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/os/common/modules/nix.nix b/os/common/modules/nix.nix index cf3843e..711ead4 100644 --- a/os/common/modules/nix.nix +++ b/os/common/modules/nix.nix @@ -3,23 +3,31 @@ let user = config.global.userdata.name; in { - nix.settings = { - auto-optimise-store = true; - use-xdg-base-directories = true; - trusted-users = [ user ]; + nix = { + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 30d"; + }; - experimental-features = [ - "flakes" - "nix-command" - ]; + settings = { + auto-optimise-store = true; + use-xdg-base-directories = true; + trusted-users = [ user ]; - substituters = [ - "https://nixbin.sinanmohd.com" - "https://nix-community.cachix.org" - ]; - trusted-public-keys = [ - "nixbin.sinanmohd.com:dXV3KDPVrm+cGJ2M1ZmTeQJqFGaEapqiVoWHgYDh03k=" - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - ]; + experimental-features = [ + "flakes" + "nix-command" + ]; + + substituters = [ + "https://nixbin.sinanmohd.com" + "https://nix-community.cachix.org" + ]; + trusted-public-keys = [ + "nixbin.sinanmohd.com:dXV3KDPVrm+cGJ2M1ZmTeQJqFGaEapqiVoWHgYDh03k=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + ]; + }; }; } -- cgit v1.2.3