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

20 lines
449 B
Nix
Raw Normal View History

{ config, ... }:
let
cfg = config.const.host.nginx;
in
2025-01-06 19:15:58 +03:00
{
"craft.${cfg.domain}" = {
inherit (cfg) sslCertificate sslCertificateKey extraConfig;
locations."/" = {
proxyPass = "http://[::1]:33122$request_uri";
2025-01-09 17:08:21 +03:00
extraConfig =
cfg.allowLocal
+ ''
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto https;
'';
};
};
2025-01-06 19:15:58 +03:00
}