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

22 lines
593 B
Nix
Raw Normal View History

{ config, ... }:
let
cfg = config.const.host.nginx;
in
2024-12-02 21:12:45 +03:00
{
"yt.${cfg.domain}" = {
inherit (cfg) sslCertificate sslCertificateKey extraConfig;
locations."/" = {
proxyPass = "http://[::1]:3001$request_uri";
extraConfig = cfg.allowLocal + ''
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_hide_header Content-Security-Policy;
proxy_hide_header X-Frame-Options;
proxy_hide_header X-Content-Type-Options;
'';
};
};
2024-12-02 21:12:45 +03:00
}