tadpole: Automatically garbage collect generations
This commit is contained in:
@@ -1,10 +1,24 @@
|
||||
{ ... }:
|
||||
{ inputs, config, ... }:
|
||||
{
|
||||
boot = {
|
||||
loader = {
|
||||
grub = {
|
||||
enable = true;
|
||||
device = "/dev/sda";
|
||||
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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user