From 9b1e7d405a2d753a32ad4d77943f4dab91bfaf49 Mon Sep 17 00:00:00 2001 From: Wesley Irvin Date: Fri, 30 Jun 2023 12:49:20 -0400 Subject: [PATCH] Cleanup Automation Added in configuration options to automatically optimize the nix-store and automatically garbage collect stale references in the store after 2 weeks. --- configs/desktop.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/configs/desktop.nix b/configs/desktop.nix index a737f43..044ce1d 100644 --- a/configs/desktop.nix +++ b/configs/desktop.nix @@ -104,6 +104,17 @@ ''; }; + # Enable automatic optimization of the nix store + nix.settings.auto-optimise-store = true; + + # Enable automatic garbage collection on anything + # stale and older than 2 weeks + nix.gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 14d"; + }; + # Setup our ZSH shell. # First let's absolutely make sure the shell is enabled programs.zsh.enable = true;