modules: move builder into common

This commit is contained in:
zowoq 2024-11-21 12:53:07 +10:00
parent 272bb5ffc1
commit c229a2a776
11 changed files with 34 additions and 35 deletions

View file

@ -1,29 +0,0 @@
{
config,
inputs,
pkgs,
...
}:
{
nix.gc.automatic = false;
systemd.services.free-space = {
serviceConfig.Type = "oneshot";
startAt = "hourly";
path = [
config.nix.package
pkgs.coreutils
];
script = builtins.readFile "${inputs.self}/modules/shared/free-space.bash";
};
# Bump the open files limit so that non-root users can run NixOS VM tests
security.pam.loginLimits = [
{
domain = "*";
item = "nofile";
type = "-";
value = "20480";
}
];
}

View file

@ -0,0 +1,32 @@
{
config,
inputs,
lib,
pkgs,
...
}:
{
config = lib.mkIf (lib.hasPrefix "build" config.networking.hostName) {
nix.gc.automatic = false;
systemd.services.free-space = {
serviceConfig.Type = "oneshot";
startAt = "hourly";
path = [
config.nix.package
pkgs.coreutils
];
script = builtins.readFile "${inputs.self}/modules/shared/free-space.bash";
};
# Bump the open files limit so that non-root users can run NixOS VM tests
security.pam.loginLimits = [
{
domain = "*";
item = "nofile";
type = "-";
value = "20480";
}
];
};
}

View file

@ -9,6 +9,7 @@
../../shared/known-hosts.nix
../../shared/nix-daemon.nix
./agenix.nix
./builder.nix
./security.nix
./sops-nix.nix
./telegraf.nix