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, ... }:
{ {
boot = { imports = [ inputs.nix-gc-env.nixosModules.default ];
loader = {
grub = { config = {
enable = true; nix.gc = {
device = "/dev/sda"; 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;
};
}; };
}; };
}; };