services: forgejo: simplify nginx setup

Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
Christoph Heiss 2024-08-24 13:20:08 +02:00
parent 981fe69bf5
commit 7abca790ca
Signed by: c8h4
GPG key ID: 6817E9C75C0785D7

View file

@ -119,14 +119,13 @@ in {
};
services.nginx.virtualHosts.${fqdn} =
let serverCfg = config.services.forgejo.settings.server;
let inherit (config.services.forgejo.settings.server) HTTP_ADDR HTTP_PORT;
in {
forceSSL = true;
useACMEHost = my.domain;
kTLS = true;
locations."/" = {
proxyPass =
"http://[${serverCfg.HTTP_ADDR}]:${toString serverCfg.HTTP_PORT}";
proxyPass = "http://[${HTTP_ADDR}]:${toString HTTP_PORT}";
proxyWebsockets = true;
extraConfig = ''
client_max_body_size 256M;