2019-06-22 23:58:08 +02:00
|
|
|
{
|
2023-09-11 20:23:04 +02:00
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
with lib;
|
2024-11-20 20:32:38 +01:00
|
|
|
{
|
|
|
|
vHost =
|
|
|
|
if config.services.hydra.enable then
|
|
|
|
{
|
2023-09-11 20:23:04 +02:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
'';
|
2019-06-22 23:58:08 +02:00
|
|
|
}
|
2024-11-20 20:32:38 +01:00
|
|
|
else
|
|
|
|
{ };
|
|
|
|
}
|
|
|
|
.vHost
|