feat: Move URLs to vars

This commit is contained in:
Tibo De Peuter 2026-02-04 09:25:45 +01:00
parent 6deb36d920
commit ca7875dee9
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2

View file

@ -80,7 +80,7 @@ prefixLength = 24;
# Only allow PFS-enabled ciphers with AES256 # Only allow PFS-enabled ciphers with AES256
sslCiphers = "AES256+EECDH:AES256+EDH:!aNULL"; sslCiphers = "AES256+EECDH:AES256+EDH:!aNULL";
upstreams.docservice.servers."192.168.0.14:8080" = {}; upstreams.docservice.servers."${nextcloud.host}:${toString nextcloud.officePort}" = {};
appendHttpConfig = '' appendHttpConfig = ''
map $http_x_forwarded_proto $the_scheme { map $http_x_forwarded_proto $the_scheme {
@ -107,19 +107,24 @@ prefixLength = 24;
default = true; default = true;
}; };
"cloud.depeuter.dev" = { "cloud.depeuter.dev" = let
nextcloud = {
host = "192.168.0.14";
officePort = 8080;
};
in {
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
locations = { locations = {
"/" = { "/" = {
proxyPass = "http://192.168.0.14"; proxyPass = "http://${nextcloud.host}";
extraConfig = '' extraConfig = ''
add_header Strict-Transport-Security "max-age=15552000; includeSubDomains" always; add_header Strict-Transport-Security "max-age=15552000; includeSubDomains" always;
fastcgi_request_buffering off; fastcgi_request_buffering off;
''; '';
}; };
"/office/" = { "/office/" = {
proxyPass = "http://192.168.0.14:8080/"; proxyPass = "http://${nextcloud.host}:${toString nextcloud.officePort}/";
priority = 500; priority = 500;
recommendedProxySettings = false; recommendedProxySettings = false;
extraConfig = '' extraConfig = ''
@ -137,12 +142,6 @@ prefixLength = 24;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
''; '';
}; };
"calendar.depeuter.dev" = {
useACMEHost = "depeuter.dev";
locations."/".return = "301 https://cloud.depeuter.dev/apps/calendar";
};
"tasks.depeuter.dev".locations."/".return = "301 https://cloud.depeuter.dev/apps/tasks";
"notes.depeuter.dev".locations."/".return = "301 https://cloud.depeuter.dev/apps/notes";
"home.depeuter.dev" = { "home.depeuter.dev" = {
enableACME = true; enableACME = true;
@ -158,12 +157,17 @@ prefixLength = 24;
}; };
}; };
"jelly.depeuter.dev" = { "jelly.depeuter.dev" = let
jellyfin = {
host = "192.168.0.94";
port = 8096;
};
in {
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
locations = { locations = {
"/" = { "/" = {
proxyPass = "http://192.168.0.94:8096"; proxyPass = "http://${jellyfin.host}:${jellyfin.port}";
extraConfig = '' extraConfig = ''
# Proxy main Jellyfin traffic # Proxy main Jellyfin traffic
proxy_set_header Host $host; proxy_set_header Host $host;
@ -178,7 +182,7 @@ prefixLength = 24;
''; '';
}; };
"/socket" = { "/socket" = {
proxyPass = "http://192.168.0.91:8096"; proxyPass = "http://${jellyfin.host}:${jellyfin.port}";
extraConfig = '' extraConfig = ''
# Proxy Jellyfin Websockets traffic # Proxy Jellyfin Websockets traffic
proxy_http_version 1.1; proxy_http_version 1.1;