nix/host/x86_64-linux/home/nginx/Sync.nix
2025-01-09 19:03:27 +03:00

19 lines
407 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";
'';
};
};
}