{ pkgs, config, ... }: { services.nginx.virtualHosts.${config.services.forgejo.settings.server.DOMAIN} = { forceSSL = true; enableACME = true; extraConfig = '' client_max_body_size 512M; ''; locations."/" = { proxyPass = "http://localhost:${toString config.services.forgejo.settings.server.HTTP_PORT}"; proxyWebsockets = true; extraConfig = '' proxy_pass_header Authorization; ''; }; }; services.forgejo = { enable = true; database.type = "postgres"; lfs.enable = true; settings = { server = { DOMAIN = "git.katkak.dev"; ROOT_URL = "https://${config.services.forgejo.settings.server.DOMAIN}/"; HTTP_PORT = 3000; }; service.DISABLE_REGISTRATION = true; actions = { ENABLED = true; DEFAULT_ACTIONS_URL = "github"; }; }; }; }