2024-08-30 01:17:50 -04:00
|
|
|
{outputs, ...}: {
|
2024-08-26 13:07:59 -04:00
|
|
|
services = {
|
|
|
|
gitea = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
server = {
|
2024-08-30 01:17:50 -04:00
|
|
|
DOMAIN = "git.${outputs.secrets.jimDomain}";
|
|
|
|
ROOT_URL = "https://git.${outputs.secrets.jimDomain}:443";
|
2024-08-26 13:07:59 -04:00
|
|
|
HTTP_PORT = 3110;
|
|
|
|
SSH_PORT = 2299;
|
|
|
|
START_SSH_SERVER = true;
|
|
|
|
};
|
|
|
|
mailer = {
|
|
|
|
ENABLED = true;
|
2024-08-30 01:17:50 -04:00
|
|
|
SMTP_ADDR = "mx.${outputs.secrets.jimDomain}";
|
|
|
|
FROM = "Jimbo's Git <noreply@${outputs.secrets.jimDomain}>";
|
|
|
|
USER = "noreply@${outputs.secrets.jimDomain}";
|
|
|
|
PASSWD = outputs.secrets.noreplyPassword;
|
2024-08-26 13:07:59 -04:00
|
|
|
PROTOCOL = "smtps";
|
|
|
|
};
|
|
|
|
service.REGISTER_EMAIL_CONFIRM = true;
|
2024-08-24 22:16:51 -04:00
|
|
|
};
|
2024-08-26 13:07:59 -04:00
|
|
|
};
|
2024-08-30 01:17:50 -04:00
|
|
|
nginx.virtualHosts."git.${outputs.secrets.jimDomain}" = {
|
2024-08-26 13:07:59 -04:00
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
locations."/" = {
|
|
|
|
proxyPass = "http://127.0.0.1:3110";
|
|
|
|
proxyWebsockets = true;
|
2024-08-24 22:16:51 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-09-04 20:22:13 -04:00
|
|
|
|
|
|
|
# Allow Gitea SSH to work
|
|
|
|
networking.firewall.allowedTCPPorts = [ 2299 ];
|
2024-08-24 22:16:51 -04:00
|
|
|
}
|