hydra: upload cachix directly
This no longer requires stopping hydra when doing nix-gc to avoid race conditions in cachix-watch store.
This commit is contained in:
parent
6a712731c7
commit
75a1130d7a
2 changed files with 12 additions and 8 deletions
|
@ -16,7 +16,6 @@
|
||||||
../roles/common.nix
|
../roles/common.nix
|
||||||
../roles/hetzner-network.nix
|
../roles/hetzner-network.nix
|
||||||
../roles/nginx.nix
|
../roles/nginx.nix
|
||||||
../roles/nix-community-cache.nix
|
|
||||||
|
|
||||||
../services/hound
|
../services/hound
|
||||||
../services/hydra
|
../services/hydra
|
||||||
|
|
|
@ -92,13 +92,10 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
#services.nginx.virtualHosts = {
|
sops.secrets.nix-community-cachix = {
|
||||||
# "hydra.nix-community.org" = {
|
owner = "hydra-queue-runner";
|
||||||
# forceSSL = true;
|
sopsFile = ../../roles/nix-community-cache.yaml;
|
||||||
# enableACME = true;
|
};
|
||||||
# locations."/".proxyPass = "http://localhost:${toString (hydraPort)}";
|
|
||||||
# };
|
|
||||||
#};
|
|
||||||
|
|
||||||
services.hydra = {
|
services.hydra = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -111,6 +108,14 @@ in
|
||||||
usersFile = hydraUsersFile;
|
usersFile = hydraUsersFile;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
max_output_size = ${builtins.toString (8 * 1024 * 1024 * 1024)}
|
max_output_size = ${builtins.toString (8 * 1024 * 1024 * 1024)}
|
||||||
|
|
||||||
|
<runcommand>
|
||||||
|
command = ${pkgs.writeShellScript "cachix-upload" ''
|
||||||
|
export PATH=${config.nix.package}/bin
|
||||||
|
${pkgs.jq}/bin/jq -r '.outputs | .[] | .path' < $HYDRA_JSON | \
|
||||||
|
${pkgs.cachix}/bin/cachix -c ${config.sops.secrets.nix-community-cachix.path} push nix-community
|
||||||
|
''}
|
||||||
|
</runcommand>
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue