tadpole: Automatically garbage collect generations

This commit is contained in:
Alexander Heldt
2024-07-27 11:56:07 +02:00
parent 813d896b61
commit 8c303f557a

View File

@@ -1,10 +1,24 @@
{ ... }:
{ inputs, 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 = {
loader = {
grub = {
enable = true;
device = "/dev/sda";
configurationLimit = 10;
};
};
};
};