From b46c4e65ea88706f2ee1e0f8374f53013dc6f29d Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Mon, 12 Feb 2024 20:29:17 +0100 Subject: [PATCH] Automatically clean up /nix. I don't have unlimited storage. --- hosts/default/configuration.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hosts/default/configuration.nix b/hosts/default/configuration.nix index 4ecbb5a..71558ff 100644 --- a/hosts/default/configuration.nix +++ b/hosts/default/configuration.nix @@ -293,6 +293,14 @@ magicOrExtension = ''\x7fELF....AI\x02''; }; + # Automatic cleanup and optimization + nix.optimize.automatic = true; + nix.gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 15d"; + } + # DO NOT CHANGE system.stateVersion = "23.11";