feat: drafted out reverse proxy config for panoramax

This commit is contained in:
Leyla Becker 2025-09-15 14:54:31 -05:00
parent 0f87d78271
commit dbd5d36913

View file

@ -53,6 +53,12 @@ in {
description = "The panoramax package to use"; description = "The panoramax package to use";
}; };
subdomain = lib.mkOption {
type = lib.types.str;
description = "subdomain of base domain that panoramax will be hosted at";
default = "panoramax";
};
# TODO: sgblur config # TODO: sgblur config
port = mkOption { port = mkOption {
type = types.nullOr types.port; type = types.nullOr types.port;
@ -233,7 +239,25 @@ in {
} }
( (
lib.mkIf config.host.reverse_proxy.enable { lib.mkIf config.host.reverse_proxy.enable {
# TODO: configure reverse proxy here host = {
reverse_proxy.subdomains.${config.services.panoramax.subdomain} = {
target = "http://localhost:${toString config.services.panoramax.port}";
websockets.enable = true;
forwardHeaders.enable = true;
extraConfig = ''
# allow large file uploads for panoramic images
client_max_body_size 100M;
# set timeout for image processing
proxy_read_timeout 300s;
proxy_send_timeout 300s;
send_timeout 300s;
proxy_redirect off;
'';
};
};
} }
) )
( (