pinwheel: Automatically garbage collect generations

This commit is contained in:
Alexander Heldt
2024-07-27 11:49:39 +02:00
parent ca05d02b85
commit 6e67da9c6f

View File

@@ -1,5 +1,16 @@
{ pkgs, ... }: { inputs, pkgs, config, ... }:
{ {
imports = [ inputs.nix-gc-env.nixosModules.default ];
config = {
nix.gc = {
automatic = true;
dates = "weekly";
# `delete_generations` added by nix-gc-env
delete_generations = "+${builtins.toString config.boot.loader.systemd-boot.configurationLimit}";
};
boot = { boot = {
kernelPackages = pkgs.linuxPackages_latest; kernelPackages = pkgs.linuxPackages_latest;
@@ -10,7 +21,11 @@
}; };
loader = { loader = {
systemd-boot.enable = true; systemd-boot = {
enable = true;
configurationLimit = 10;
};
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
}; };
@@ -18,4 +33,5 @@
"/crypto_keyfile.bin" = null; "/crypto_keyfile.bin" = null;
}; };
}; };
};
} }