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