From 229ab0ea80aeeded2f69cb63b47c58d91e3f1ed0 Mon Sep 17 00:00:00 2001 From: John Lancaster <32917998+jsl12@users.noreply.github.com> Date: Mon, 10 Mar 2025 21:56:30 -0500 Subject: [PATCH] added space optimization stuff --- configuration.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/configuration.nix b/configuration.nix index 9443fb9..e2ae050 100644 --- a/configuration.nix +++ b/configuration.nix @@ -43,4 +43,13 @@ "30 2 * * * /run/current-system/sw/bin/nfs > /etc/nixos/auto_update.log 2>&1" ]; }; + + # https://nixos.wiki/wiki/Storage_optimization + nix.gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 30d"; + }; + nix.optimise.automatic = true; + nix.optimise.dates = [ "Mon *-*-* 05:00:00" ]; }