NixOS-Config/nixos/server/archived/gitea.nix

37 lines
1 KiB
Nix
Raw Normal View History

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