{ lib, config, inputs, pkgs, ... }: let root_host = "grimmauld.de"; gitea_host = "git.${root_host}"; gitea_port = 8081; in { services.gitea = { enable = true; settings = { service.DISABLE_REGISTRATION = true; server = { HTTP_PORT = gitea_port; ROOT_URL = "https://${gitea_host}/"; DISABLE_SSH = true; }; # log.LEVEL = "Debug"; }; lfs.enable = true; }; security.acme.certs."${root_host}".extraDomainNames = [ gitea_host]; services.nginx = { enable = true; virtualHosts."${gitea_host}" = { serverName = gitea_host; forceSSL = true; useACMEHost = root_host; locations."/" = { proxyPass = "http://127.0.0.1:${builtins.toString config.services.gitea.settings.server.HTTP_PORT}"; }; }; }; }