pinwheel: Automatically garbage collect generations
This commit is contained in:
@@ -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;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user