nixos-conf/servers/hydra.nix

65 lines
1.2 KiB
Nix
Raw Normal View History

2025-06-13 13:13:59 +03:00
{ lib, ... }:
2025-06-11 20:45:47 +03:00
let
domain = "ci.sinerva.eu";
in
{
imports = [
./utils/nginx-https-server.nix
./utils/acme-http-client.nix
];
2025-06-12 00:36:51 +03:00
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
2025-06-11 20:45:47 +03:00
services = {
hydra = {
enable = true;
hydraURL = "https://${domain}";
listenHost = "localhost";
notificationSender = "hydra@sinerva.eu";
port = 8080;
useSubstitutes = true;
2025-06-11 22:16:27 +03:00
extraConfig = ''
<dynamicruncommand>
enable = 1
</dynamicruncommand>
'';
2025-06-11 20:45:47 +03:00
};
nginx.virtualHosts.${domain}.locations."/" = {
proxyPass = "http://localhost:8080";
};
};
2025-06-11 22:16:27 +03:00
nix = {
settings.allowed-uris = [
"github:"
"git+https://github.com/"
"git+ssh://github.com/"
];
2025-06-11 20:45:47 +03:00
2025-06-11 22:16:27 +03:00
buildMachines = [
{
hostName = "localhost";
protocol = null;
2025-06-12 00:36:51 +03:00
systems = [
"x86_64-linux"
"aarch64-linux"
];
2025-06-11 22:16:27 +03:00
supportedFeatures = [
"kvm"
"nixos-test"
"big-parallel"
"benchmark"
];
maxJobs = 6;
}
];
2025-06-13 13:13:59 +03:00
gc = {
options = lib.mkForce "--delete-older-than 1d";
dates = lib.mkForce "hourly";
randomizedDelaySec = lib.mkForce "0";
};
2025-06-11 22:16:27 +03:00
};
2025-06-11 20:45:47 +03:00
}