2023-12-28 15:32:47 +01:00
|
|
|
{ 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."/" = {
|
2023-12-31 09:57:22 +01:00
|
|
|
proxyPass = "http://127.0.0.1:${builtins.toString config.services.gitea.settings.server.HTTP_PORT}";
|
2023-12-28 15:32:47 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|