modules/builder: gc by percent used

This commit is contained in:
zowoq 2024-08-11 12:05:42 +10:00
parent a7dfa3d0ce
commit db3e6fc921
8 changed files with 48 additions and 32 deletions
modules/nixos

View file

@ -1,7 +1,21 @@
{
imports = [ ../shared/builder.nix ];
config,
inputs,
pkgs,
...
}:
{
nix.gc.automatic = false;
nix.gc.dates = "hourly";
systemd.services.free-space = {
serviceConfig.Type = "oneshot";
startAt = "hourly";
path = [
config.nix.package
pkgs.coreutils
];
script = import "${inputs.self}/modules/shared/free-space.nix";
};
# Bump the open files limit so that non-root users can run NixOS VM tests
security.pam.loginLimits = [