From 1ed32e29b01b673bff7982636be1c2dd2694e859 Mon Sep 17 00:00:00 2001 From: Cookiez Date: Sun, 31 May 2026 20:11:19 +0200 Subject: [PATCH] Added automatic nix store optimisation and garbage collection of versions older than 14 days --- modules/configuration.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/configuration.nix b/modules/configuration.nix index 3d3bc9b..991a339 100644 --- a/modules/configuration.nix +++ b/modules/configuration.nix @@ -26,7 +26,15 @@ } ]; nix = { - settings.nix-path = config.nix.nixPath; + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 14d"; + }; + settings = { + auto-optimise-store = true; + nix-path = config.nix.nixPath; + }; nixPath = ["nixpkgs=${inputs.nixpkgs}"]; };