From 0662d794474f3586ef7d650cc23075b21c6c122c Mon Sep 17 00:00:00 2001 From: Nico Date: Sat, 3 May 2025 16:15:58 +1000 Subject: [PATCH] nix: auto clean store weekly --- hosts/nixos-common.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hosts/nixos-common.nix b/hosts/nixos-common.nix index b310b8c..2e0fdf3 100644 --- a/hosts/nixos-common.nix +++ b/hosts/nixos-common.nix @@ -31,6 +31,13 @@ networking.firewall.allowedTCPPorts = [ 22 ]; # networking.firewall.allowedUDPPorts = [ ... ]; + # Auto store clean + nix.gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 7d"; + }; + # This option defines the first version of NixOS you have installed on this particular machine, and is used # to maintain compatibility with application data (e.g. databases) created on older NixOS versions. Most # users should NEVER change this value after the initial install, for any reason, even if you've upgraded