17 lines
385 B
Nix
17 lines
385 B
Nix
{ config, ... }:
|
|
let
|
|
cfg = config.const.host.nginx;
|
|
in
|
|
{
|
|
"sync.${cfg.domain}" = {
|
|
inherit (cfg) sslCertificate sslCertificateKey extraConfig;
|
|
locations."/" = {
|
|
proxyPass = "http://[::1]:8384$request_uri";
|
|
extraConfig = cfg.allowLocal + ''
|
|
proxy_set_header Host "localhost";
|
|
proxy_set_header X-Forwarded-Host "localhost";
|
|
'';
|
|
};
|
|
};
|
|
}
|