1
0
Fork 0
nixos/services/nginx_vHosts/hydra.nix

18 lines
471 B
Nix

{ config, lib, ... }:
with lib;
{
vHost = if config.services.hydra.enable then {
extraConfig = ''
location / {
proxy_pass http://${config.services.hydra.listenHost}:${toString config.services.hydra.port};
proxy_set_header Host $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;
}
'';
} else {};
}.vHost