nix/host/x86_64-linux/home/nginx/Sync.nix

19 lines
407 B
Nix
Raw Normal View History

{ config, ... }:
let
cfg = config.const.host.nginx;
in
2024-12-08 04:04:34 +03:00
{
"sync.${cfg.domain}" = {
inherit (cfg) sslCertificate sslCertificateKey extraConfig;
locations."/" = {
proxyPass = "http://[::1]:8384$request_uri";
2025-01-09 17:08:21 +03:00
extraConfig =
cfg.allowLocal
+ ''
proxy_set_header Host "localhost";
proxy_set_header X-Forwarded-Host "localhost";
'';
};
};
2024-12-08 04:04:34 +03:00
}