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
This commit is contained in:
Sergei Poljanski 2026-11-08 05:08:45 +04:00
commit 611561b20c
Signed by: asxpi
GPG key ID: 4F8851660FA4121B

View file

@ -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;