83 lines
2.0 KiB
Nix
83 lines
2.0 KiB
Nix
{ hostRegistry, config, lib, pkgs, ... }:
|
|
|
|
let
|
|
nix-build = "client@${config.c3d2.hosts.nix-build.ip4}";
|
|
in {
|
|
nix = {
|
|
extraOptions = ''
|
|
allowed-uris = http:// https:// ssh://
|
|
'';
|
|
trustedUsers = [ "hydra" "root" ];
|
|
buildMachines = [ {
|
|
hostName = "localhost";
|
|
system = lib.concatStringsSep "," (
|
|
[ pkgs.system "i686-linux" ]
|
|
);
|
|
supportedFeatures = [ "big-parallel" "benchmark" "kvm" "nixos-test" ];
|
|
inherit (config.nix) maxJobs;
|
|
} {
|
|
hostName = "client@nix-build.serv.zentralwerk.org";
|
|
system = lib.concatStringsSep "," [
|
|
"x86_64-linux" "i686-linux"
|
|
"armv6l-linux" "armv7l-linux"
|
|
"aarch64-linux" "riscv64-linux"
|
|
];
|
|
supportedFeatures = [ "big-parallel" ];
|
|
maxJobs = 4;
|
|
}];
|
|
|
|
daemonCPUSchedPolicy = "idle";
|
|
daemonIOSchedClass = "idle";
|
|
daemonIOSchedPriority = 7;
|
|
};
|
|
|
|
services.hydra-dev = {
|
|
enable = true;
|
|
hydraURL = "https://hydra.hq.c3d2.de";
|
|
logo = ./c3d2.svg;
|
|
notificationSender = "hydra@spam.works";
|
|
useSubstitutes = true;
|
|
extraConfig = ''
|
|
max_output_size = 4294967296
|
|
evaluator_workers = 4
|
|
evaluator_max_memory_size = 2048
|
|
'';
|
|
};
|
|
|
|
systemd.services = {
|
|
hydra-evaluator.serviceConfig = {
|
|
CPUWeight = 2;
|
|
MemoryHigh = "32G";
|
|
MemoryMax = "32G";
|
|
MemorySwapMax = "16G";
|
|
};
|
|
services.nix-daemon.serviceConfig = {
|
|
LimitNOFILE = lib.mkForce 8192;
|
|
CPUWeight = 5;
|
|
MemoryHigh = "32G";
|
|
MemoryMax = "32G";
|
|
MemorySwapMax = "16G";
|
|
};
|
|
};
|
|
|
|
services.nginx =
|
|
let
|
|
hydraVhost = {
|
|
forceSSL = true;
|
|
enableACME = true;
|
|
locations."/".proxyPass =
|
|
"http://localhost:${toString config.services.hydra.port}";
|
|
};
|
|
in {
|
|
enable = true;
|
|
recommendedProxySettings = true;
|
|
recommendedGzipSettings = true;
|
|
virtualHosts = {
|
|
"hydra.hq.c3d2.de" = hydraVhost // {
|
|
default = true;
|
|
};
|
|
"hydra.serv.zentralwerk.org" = hydraVhost;
|
|
};
|
|
};
|
|
}
|