forked from rarias/jungle
Compare commits
8 Commits
1a5ba3b930
...
weasel-hyd
| Author | SHA1 | Date | |
|---|---|---|---|
|
0b047b7272
|
|||
|
354c11c329
|
|||
|
6a01158c43
|
|||
|
d7f92a9126
|
|||
|
ed6cb7e6ea
|
|||
|
ed8eafba79
|
|||
|
937f08d11c
|
|||
|
71b8198e4a
|
@@ -1,10 +1,11 @@
|
|||||||
{ lib, ... }:
|
{ lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../common/ssf.nix
|
../common/ssf.nix
|
||||||
../module/hut-substituter.nix
|
../module/hut-substituter.nix
|
||||||
./virtualization.nix
|
./virtualization.nix
|
||||||
|
./hydra.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Select this using the ID to avoid mismatches
|
# Select this using the ID to avoid mismatches
|
||||||
@@ -32,4 +33,22 @@
|
|||||||
} ];
|
} ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.nix-serve = {
|
||||||
|
enable = true;
|
||||||
|
bindAddress = "0.0.0.0";
|
||||||
|
port = 5000;
|
||||||
|
package = pkgs.haskell.lib.overrideSrc (pkgs.haskell.packages.ghc96.nix-serve-ng.override { nix = pkgs.nixVersions.nix_2_28; }) {
|
||||||
|
src = pkgs.fetchgit {
|
||||||
|
url = "https://jungle.bsc.es/git/abonerib/nix-serve-ng.git";
|
||||||
|
rev = "9c056641300a826db66b66d7e584b2541d38927a";
|
||||||
|
hash = "sha256-y69ZchFiZOU71eyeljcQgLxkLk5JUzZfanq8Yzw4MkI=";
|
||||||
|
};
|
||||||
|
version = "unstable";
|
||||||
|
};
|
||||||
|
|
||||||
|
secretKeyFile = "/var/cache-priv-key.pem";
|
||||||
|
# Public key:
|
||||||
|
# 10.0.40.6:8jBhIdXEBap+Qo+vc1/fnV9vj43A2oDk839EEheRr/U=
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
52
m/weasel/hydra.nix
Normal file
52
m/weasel/hydra.nix
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
{ 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;
|
||||||
|
# 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;
|
||||||
|
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 = [
|
||||||
|
"git+ssh://git@bscpm04.bsc.es"
|
||||||
|
"git+ssh://git@gitlab-internal.bsc.es"
|
||||||
|
"https://github.com"
|
||||||
|
"git+ssh://github.com"
|
||||||
|
];
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user