nix-config/hosts/hydra/cache.nix

27 lines
648 B
Nix

{ config, pkgs, ... }:
{
services.nix-serve = {
enable = true;
secretKeyFile = "/var/cache-priv-key.pem";
};
services.nginx.virtualHosts."nix-serve.hq.c3d2.de" = {
forceSSL = true;
enableACME = true;
locations."/".extraConfig = ''
proxy_pass http://127.0.0.1:${toString config.services.nix-serve.port};
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
'';
};
services.nginx.virtualHosts."depot.hq.c3d2.de" = {
forceSSL = true;
enableACME = true;
locations."/".root = "/srv/www/depot";
};
}