1
0
Fork 0
nix-config/hosts/hydra/hydra.nix

83 lines
2.0 KiB
Nix
Raw Normal View History

2022-05-07 00:50:01 +02:00
{ hostRegistry, config, lib, pkgs, ... }:
2021-03-12 21:45:12 +01:00
2021-11-10 00:30:57 +01:00
let
2022-01-16 13:26:37 +01:00
nix-build = "client@${config.c3d2.hosts.nix-build.ip4}";
2021-11-10 00:30:57 +01:00
in {
2021-03-12 21:45:12 +01:00
nix = {
extraOptions = ''
allowed-uris = http:// https:// ssh://
2021-03-12 21:45:12 +01:00
'';
trustedUsers = [ "hydra" "root" ];
2021-11-10 00:30:57 +01:00
buildMachines = [ {
hostName = "localhost";
2022-05-07 00:50:01 +02:00
system = lib.concatStringsSep "," (
[ pkgs.system "i686-linux" ]
2022-05-07 00:50:01 +02:00
);
2022-05-05 22:34:51 +02:00
supportedFeatures = [ "big-parallel" "benchmark" "kvm" "nixos-test" ];
2022-05-07 01:01:02 +02:00
inherit (config.nix) maxJobs;
2022-06-09 01:24:58 +02:00
} {
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;
2021-03-12 21:45:12 +01:00
};
2022-05-12 02:58:47 +02:00
services.hydra-dev = {
2021-03-12 21:45:12 +01:00
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
'';
2021-03-12 21:45:12 +01:00
};
2022-06-12 17:26:32 +02:00
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";
};
};
2021-03-12 21:45:12 +01:00
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;
};
};
}