fix hydra hosts
This commit is contained in:
parent
1ec0b04fd7
commit
874b4d0280
1 changed files with 27 additions and 2 deletions
|
@ -6,8 +6,7 @@ let
|
||||||
'';
|
'';
|
||||||
clean-cache = pkgs.callPackage ../../packages/clean-s3-cache.nix { };
|
clean-cache = pkgs.callPackage ../../packages/clean-s3-cache.nix { };
|
||||||
machines = pkgs.writeText "machines" ''
|
machines = pkgs.writeText "machines" ''
|
||||||
localhost armv7l-linux,aarch64-linux,powerpc-linux,powerpc64-linux,powerpc64le-linux,riscv32-linux,riscv64-linux,wasm32-wasi,x86_64-linux,i686-linux - 12 2 kvm,nixos-test,big-parallel,benchmark,gccarch-znver2,gccarch-znver1,gccarch-skylake,ca-derivations -
|
localhost armv7l-linux,aarch64-linux,powerpc-linux,powerpc64-linux,powerpc64le-linux,riscv32-linux,riscv64-linux,wasm32-wasi,x86_64-linux,i686-linux - 12 1 kvm,nixos-test,big-parallel,benchmark,gccarch-znver1,gccarch-skylake,ca-derivations -
|
||||||
build-pc armv7l-linux,aarch64-linux,powerpc-linux,powerpc64-linux,powerpc64le-linux,riscv32-linux,riscv64-linux,wasm32-wasi,x86_64-linux,i686-linux - 16 1 kvm,nixos-test,big-parallel,benchmark,gccarch-znver2,gccarch-znver1,gccarch-skylake,ca-derivations -
|
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -34,6 +33,10 @@ in
|
||||||
'';
|
'';
|
||||||
giteaTokenFile = "/run/secrets/services/hydra/gitea_token";
|
giteaTokenFile = "/run/secrets/services/hydra/gitea_token";
|
||||||
githubTokenFile = "/run/secrets/services/hydra/github_token";
|
githubTokenFile = "/run/secrets/services/hydra/github_token";
|
||||||
|
buildMachineFiles = [
|
||||||
|
"${machines}"
|
||||||
|
"/run/hydra-machines"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
nix.settings.allowed-uris = [ "https://github.com/" "https://git.chir.rs/" "https://darkkirb.de/" "https://git.neo-layout.org/" "https://static.darkkirb.de/" ];
|
nix.settings.allowed-uris = [ "https://github.com/" "https://git.chir.rs/" "https://darkkirb.de/" "https://git.neo-layout.org/" "https://static.darkkirb.de/" ];
|
||||||
sops.secrets."services/hydra/gitea_token" = { };
|
sops.secrets."services/hydra/gitea_token" = { };
|
||||||
|
@ -83,4 +86,26 @@ in
|
||||||
path = "/var/lib/hydra/queue-runner/.aws/credentials";
|
path = "/var/lib/hydra/queue-runner/.aws/credentials";
|
||||||
restartUnits = [ "hydra-queue-runner.service" ];
|
restartUnits = [ "hydra-queue-runner.service" ];
|
||||||
};
|
};
|
||||||
|
systemd.services.update-hydra-hosts = {
|
||||||
|
description = "Update hydra hosts";
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
};
|
||||||
|
script = ''
|
||||||
|
rm /run/hydra-machines
|
||||||
|
if ping -c 1 nutty-noon.int.chir.rs; then
|
||||||
|
echo "build-pc armv7l-linux,aarch64-linux,powerpc-linux,powerpc64-linux,powerpc64le-linux,riscv32-linux,riscv64-linux,wasm32-wasi,x86_64-linux,i686-linux - 16 2 kvm,nixos-test,big-parallel,benchmark,gccarch-znver2,gccarch-znver1,gccarch-skylake,ca-derivations -" > /run/hydra-machines
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
systemd.timers.update-hydra-hosts = {
|
||||||
|
enable = true;
|
||||||
|
description = "Update hydra hosts";
|
||||||
|
requires = [ "update-hydra-hosts.service" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
timerConfig = {
|
||||||
|
OnBootSec = 300;
|
||||||
|
OnUnitActiveSec = 300;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue