| 1 | { |
| 2 | config, |
| 3 | inputs, |
| 4 | ... |
| 5 | }: |
| 6 | |
| 7 | { |
| 8 | imports = [ |
| 9 | inputs.hydra.nixosModules.builder |
| 10 | ]; |
| 11 | |
| 12 | age.secrets."queue-runner-token" = { |
| 13 | file = ../../build/secrets/${config.networking.hostName}-queue-runner-token.age; |
| 14 | owner = "hydra-queue-builder"; |
| 15 | }; |
| 16 | |
| 17 | services.hydra-queue-builder-dev = { |
| 18 | enable = true; |
| 19 | queueRunnerAddr = "https://queue-runner.hydra.nixos.org"; |
| 20 | authorizationFile = config.age.secrets."queue-runner-token".path; |
| 21 | maxJobs = config.nix.settings.max-jobs; |
| 22 | # Required for presigned uploads: builders fetch dependencies via |
| 23 | # substitution and upload results to s3 directly. |
| 24 | useSubstitutes = true; |
| 25 | # Align this with what our GC settings |
| 26 | storeAvailThreshold = 5.0; |
| 27 | # Tolerate only minimal contention before we stop scheduling new jobs |
| 28 | cpuPsiThreshold = 15.0; |
| 29 | }; |
| 30 | } |