Use upstreams

This commit is contained in:
jaina heartles 2024-02-29 13:29:08 -08:00
parent 0ae54aeafb
commit 44a854c09d

View file

@ -15,6 +15,9 @@
services.nginx = {
enable = true;
recommendedProxySettings = true;
upstreams."home-server".extraConfig = ''
include /etc/nixos-secrets/nginx-home-server-upstream.conf;
'';
virtualHosts = {
"*.home.heartles.xyz" = {
listen = [
@ -43,10 +46,9 @@
locations."/" = {
proxyWebsockets = true;
proxyPass = "$home_address";
proxyPass = "https://home-server";
extraConfig = ''
proxy_ssl_name $host;
include /etc/nixos-secrets/nginx-proxy-pass-home.conf;
'';
};
};