modules/builder: gc by percent used
This commit is contained in:
parent
a7dfa3d0ce
commit
db3e6fc921
8 changed files with 48 additions and 32 deletions
modules/nixos
|
@ -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 = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue