From 611561b20c25ecfada2e4298bcb478e1de54f852 Mon Sep 17 00:00:00 2001 From: Sergei Poljanski Date: Sun, 8 Nov 2026 05:08:45 +0400 Subject: [PATCH] boot: collect garbage weekly and cap boot entries Run nix.gc weekly to delete generations older than 14 days, and limit lanzaboote to 10 entries so the ESP menu never lists generations whose store paths have already been collected. Assisted-by: Claude:opus-5-5 --- modules/boot.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/boot.nix b/modules/boot.nix index f21bb62..747e458 100644 --- a/modules/boot.nix +++ b/modules/boot.nix @@ -26,6 +26,15 @@ boot.lanzaboote = { enable = true; pkiBundle = "/var/lib/sbctl"; + # Keep ESP entries in step with nix.gc so the menu never lists + # generations whose store paths were collected. + configurationLimit = 10; + }; + + nix.gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 14d"; }; boot.loader.efi.canTouchEfiVariables = true;