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,21 +1,37 @@
{ pkgs, ... }:
{ inputs, pkgs, config, ... }:
{
boot = {
kernelPackages = pkgs.linuxPackages_latest;
imports = [ inputs.nix-gc-env.nixosModules.default ];
kernel = {
sysctl = {
"fs.inotify.max_user_instances" = 1024; # default: 128
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 = {
kernelPackages = pkgs.linuxPackages_latest;
kernel = {
sysctl = {
"fs.inotify.max_user_instances" = 1024; # default: 128
};
};
};
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
loader = {
systemd-boot = {
enable = true;
configurationLimit = 10;
};
initrd.secrets = {
"/crypto_keyfile.bin" = null;
efi.canTouchEfiVariables = true;
};
initrd.secrets = {
"/crypto_keyfile.bin" = null;
};
};
};
}