modules: move builder into common
This commit is contained in:
parent
272bb5ffc1
commit
c229a2a776
11 changed files with 34 additions and 35 deletions
hosts
build01
build02
build03
build04
darwin01
darwin02
modules
|
@ -1,7 +1,6 @@
|
|||
{ inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.self.nixosModules.builder
|
||||
inputs.self.nixosModules.community-builder
|
||||
inputs.self.nixosModules.disko-zfs
|
||||
inputs.srvos.nixosModules.hardware-hetzner-online-amd
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
imports = [
|
||||
./nixpkgs-update-backup.nix
|
||||
./nixpkgs-update.nix
|
||||
inputs.self.nixosModules.builder
|
||||
inputs.self.nixosModules.disko-zfs
|
||||
inputs.self.nixosModules.nginx
|
||||
inputs.srvos.nixosModules.hardware-hetzner-online-amd
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
./builders.nix
|
||||
./postgresql.nix
|
||||
inputs.self.nixosModules.buildbot
|
||||
inputs.self.nixosModules.builder
|
||||
inputs.self.nixosModules.cgroups
|
||||
inputs.self.nixosModules.ci-builder
|
||||
inputs.self.nixosModules.disko-zfs
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{ inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.self.nixosModules.builder
|
||||
inputs.self.nixosModules.cgroups
|
||||
inputs.self.nixosModules.ci-builder
|
||||
inputs.self.nixosModules.disko-zfs
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
{
|
||||
imports = [
|
||||
inputs.self.darwinModules.builder
|
||||
inputs.self.darwinModules.community-builder
|
||||
];
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
{
|
||||
imports = [
|
||||
inputs.self.darwinModules.builder
|
||||
inputs.self.darwinModules.ci-builder
|
||||
inputs.self.darwinModules.hercules-ci
|
||||
inputs.self.darwinModules.remote-builder
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
../../shared/known-hosts.nix
|
||||
../../shared/nix-daemon.nix
|
||||
./apfs-cleanup.nix
|
||||
./builder.nix
|
||||
./network.nix
|
||||
./packages.nix
|
||||
./reboot.nix
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
];
|
||||
}
|
32
modules/nixos/common/builder.nix
Normal file
32
modules/nixos/common/builder.nix
Normal 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";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
|
@ -9,6 +9,7 @@
|
|||
../../shared/known-hosts.nix
|
||||
../../shared/nix-daemon.nix
|
||||
./agenix.nix
|
||||
./builder.nix
|
||||
./security.nix
|
||||
./sops-nix.nix
|
||||
./telegraf.nix
|
||||
|
|
Loading…
Add table
Reference in a new issue