Modularized nginx config.
This commit is contained in:
parent
ea53feeb74
commit
1c62f3201e
9 changed files with 218 additions and 168 deletions
17
services/nginx_vHosts/hydra.nix
Normal file
17
services/nginx_vHosts/hydra.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ 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 $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;
|
||||
}
|
||||
'';
|
||||
} else {};
|
||||
}.vHost
|
Loading…
Add table
Add a link
Reference in a new issue