From 5f41ff2b1bd633a70a495cee73f3002f4a3e7ccf Mon Sep 17 00:00:00 2001 From: Weckyy702 Date: Wed, 11 Mar 2026 18:53:14 +0100 Subject: [PATCH] Automate nix garbage collection --- configuration.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/configuration.nix b/configuration.nix index dc86b8b..181ad6f 100644 --- a/configuration.nix +++ b/configuration.nix @@ -16,8 +16,11 @@ ## Boot # Bootloader. - boot.loader.grub.enable = true; - boot.loader.grub.device = "/dev/nvme0n1"; + boot.loader.grub = { + enable = true; + device = "/dev/nvme0n1"; + configurationLimit = 10; + }; # Use latest kernel. boot.kernelPackages = pkgs.linuxPackages_latest; @@ -54,6 +57,13 @@ "nix-command" "flakes" ]; + + nix.gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 7d"; + }; + # Allow unfree packages nixpkgs.config.allowUnfree = true;