| 1 | { inputs, config, ... }: |
| 2 | let |
| 3 | nodes = { |
| 4 | ofborg-eval02 = "eval02.ofborg.org"; |
| 5 | ofborg-eval03 = "eval03.ofborg.org"; |
| 6 | ofborg-eval04 = "eval04.ofborg.org"; |
| 7 | ofborg-build01 = "build01.ofborg.org"; |
| 8 | ofborg-build02 = "build02.ofborg.org"; |
| 9 | ofborg-build03 = "build03.ofborg.org"; |
| 10 | ofborg-build04 = "build04.ofborg.org"; |
| 11 | ofborg-build05 = "build05.ofborg.org"; |
| 12 | }; |
| 13 | nodePath = nodes."${config.networking.hostName}"; |
| 14 | in |
| 15 | { |
| 16 | imports = [ |
| 17 | inputs.hydra.nixosModules.builder |
| 18 | ./staging-cache.nix |
| 19 | ]; |
| 20 | |
| 21 | services.hydra-queue-builder-dev = { |
| 22 | enable = true; |
| 23 | queueRunnerAddr = "https://queue-runner.staging-hydra.nixos.org"; |
| 24 | maxJobs = 2; |
| 25 | mtls = { |
| 26 | serverRootCaCertPath = "${../../hosts/staging-hydra/ca.crt}"; |
| 27 | clientCertPath = "${../../hosts/${nodePath}/client.crt}"; |
| 28 | clientKeyPath = config.sops.secrets."queue-runner-client.key".path; |
| 29 | domainName = "queue-runner.staging-hydra.nixos.org"; |
| 30 | }; |
| 31 | }; |
| 32 | |
| 33 | sops.secrets."queue-runner-client.key" = { |
| 34 | owner = "hydra-queue-builder"; |
| 35 | restartUnits = [ "hydra-queue-builder-dev.service" ]; |
| 36 | sopsFile = ../../secrets/ofborg.${nodePath}.yml; |
| 37 | }; |
| 38 | } |