Binary Cache should almost work now. Switched to older Kernel on Lilim.

This commit is contained in:
Kevin Baensch 2019-03-27 13:48:09 +01:00
parent 6fe0cbebe2
commit 782cd1efae
4 changed files with 25 additions and 9 deletions

View file

@ -10,7 +10,7 @@
with lib;
mkIf (elem "hydra" config.machine.services) {
mkIf (elem "hydra" config.machine.services) rec {
# also take a look at ../conf/nix.nix
nix.buildMachines = [
{
@ -43,4 +43,16 @@ mkIf (elem "hydra" config.machine.services) {
upload_logs_to_binary_cache = true
'';
};
services.nix-serve = {
enable = true;
bindAddress = "172.0.0.1";
port = 5000;
secretKeyFile = "/secret/hydra_cache";
extraParams = ''
# Dont know how to change the store root yet...
# --user hydra-queue-runner
# --group hydra
'';
};
}

View file

@ -42,13 +42,18 @@ mkIf (elem "nginx" config.machine.services) {
}
'';
};
"cache.${config.machine.domain}" = mkIf config.services.hydra.enable {
"cache.${config.machine.domain}" = mkIf config.services.nix-serve.enable {
enableACME = true;
forceSSL = true;
root = "/var/cache/hydra";
# extraConfig = ''
# autoindex on;
# '';
extraConfig = ''
location / {
proxy_pass http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port};
proxy_set_header Host $http_host;
proxy_set_header REMOTE_ADDR $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
}
'';
};
"mail.${config.machine.domain}" = mkIf config.mailserver.enable {
enableACME = true;