Add HTTPS nix cache to hydra
This commit is contained in:
parent
11c996a69c
commit
e48938d43d
1 changed files with 17 additions and 4 deletions
|
@ -1,6 +1,7 @@
|
||||||
{ lib, ... }:
|
{ lib, ... }:
|
||||||
let
|
let
|
||||||
domain = "ci.sinerva.eu";
|
hydra_domain = "ci.sinerva.eu";
|
||||||
|
cache_domain = "cache.sinerva.eu";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
@ -13,7 +14,7 @@ in
|
||||||
services = {
|
services = {
|
||||||
hydra = {
|
hydra = {
|
||||||
enable = true;
|
enable = true;
|
||||||
hydraURL = "https://${domain}";
|
hydraURL = "https://${hydra_domain}";
|
||||||
listenHost = "localhost";
|
listenHost = "localhost";
|
||||||
notificationSender = "hydra@sinerva.eu";
|
notificationSender = "hydra@sinerva.eu";
|
||||||
port = 8080;
|
port = 8080;
|
||||||
|
@ -25,8 +26,20 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
nginx.virtualHosts.${domain}.locations."/" = {
|
nix-serve = {
|
||||||
proxyPass = "http://localhost:8080";
|
enable = true;
|
||||||
|
bindAddress = "127.0.0.2";
|
||||||
|
port = 8081;
|
||||||
|
secretKeyFile = "/persist/secrets/priv_cache_key";
|
||||||
|
};
|
||||||
|
|
||||||
|
nginx.virtualHosts = {
|
||||||
|
${hydra_domain}.locations."/" = {
|
||||||
|
proxyPass = "http://localhost:8080";
|
||||||
|
};
|
||||||
|
${cache_domain}.locations."/" = {
|
||||||
|
proxyPass = "http://127.0.0.2:8081";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue