From aca47f21ac400729b027ef2292bd4e1b6252423a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Bon=C3=A9?= Date: Thu, 27 Feb 2025 15:27:51 +0100 Subject: [PATCH] Enable hydra --- m/hut/configuration.nix | 1 + m/hut/hydra.nix | 13 +++++++++++++ m/hut/nginx.nix | 11 +++++++++++ 3 files changed, 25 insertions(+) create mode 100644 m/hut/hydra.nix diff --git a/m/hut/configuration.nix b/m/hut/configuration.nix index 493208c..6a73f81 100644 --- a/m/hut/configuration.nix +++ b/m/hut/configuration.nix @@ -19,6 +19,7 @@ ./postgresql.nix ./nginx.nix ./p.nix + ./hydra.nix #./pxe.nix ]; diff --git a/m/hut/hydra.nix b/m/hut/hydra.nix new file mode 100644 index 0000000..935c6d9 --- /dev/null +++ b/m/hut/hydra.nix @@ -0,0 +1,13 @@ +{ config, lib, ... }: +{ + services.hydra = { + enable = true; + hydraURL = "http://jungle.bsc.es/hydra"; # externally visible URL + notificationSender = "hydra@jungle.bsc.es"; # e-mail of Hydra service + port = 3001; + # a standalone Hydra will require you to unset the buildMachinesFiles list to avoid using a nonexistant /etc/nix/machines + buildMachinesFiles = []; + # you will probably also want, otherwise *everything* will be built from scratch + useSubstitutes = true; + }; +} diff --git a/m/hut/nginx.nix b/m/hut/nginx.nix index 97afc3a..52d93ab 100644 --- a/m/hut/nginx.nix +++ b/m/hut/nginx.nix @@ -45,6 +45,17 @@ in proxy_pass http://127.0.0.1:5000; proxy_redirect http:// $scheme://; } + location /hydra { + rewrite ^/hydra/(.*) /$1 break; + proxy_pass http://127.0.0.1:3001; + proxy_redirect http:// $scheme://; + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Request-Base /hydra; + } location /lists { proxy_pass http://127.0.0.1:8081; proxy_redirect http:// $scheme://;