Make hydra shut up

This commit is contained in:
Aleix Boné 2025-09-26 17:28:23 +02:00
parent 753d14d93b
commit 407c7e8f2e
No known key found for this signature in database

View File

@ -1,7 +1,34 @@
{ config, ... }:
{ config, pkgs, lib, ... }:
{
services.hydra = {
enable = true;
# Wrap hydra so it puts quiet flag every time... This is dumb and annoying,
# but i can't override the systemd ExecStart without running into infinite
# recursion.
package = pkgs.symlinkJoin {
name = "hydra-quiet";
paths = [ pkgs.hydra ];
postBuild = ''
for prog in hydra-queue-runner hydra-evaluator ; do
prev=$(realpath $out/bin/$prog)
rm $out/bin/$prog
cat >$out/bin/$prog <<EOF
#!/bin/sh
args=()
for arg in "\$@"; do
if [ "\$arg" != "-v" ]; then
args+=("\$arg")
fi
done
exec $prev --quiet "\''${args[@]}"
EOF
chmod +x $out/bin/$prog
done
'';
};
hydraURL = "http://localhost:3001"; # externally visible URL
notificationSender = "hydra@jungle.bsc.es"; # e-mail of Hydra service
port = 3001;
@ -12,6 +39,8 @@
listenHost = "0.0.0.0"; # Force IPv4
};
systemd.services.hydra-send-stats.enable = lib.mkForce false;
networking.firewall.allowedTCPPorts = [ config.services.hydra.port ];
nix.settings.extra-allowed-uris = [