Files
nixcfg/modules/gitea/default.nix
2025-08-04 00:11:49 +01:00

54 lines
1.2 KiB
Nix

{
config,
pkgs,
...
}: {
age.secrets = {
sendmail_email_key_gitea = {
file = ../../secrets/sendmail_email_key_gitea.age;
owner = "gitea";
group = "gitea";
};
};
services.gitea = {
enable = true;
appName = "The Broccoli Patch";
database = {
type = "sqlite3";
};
dump = {
enable = true;
type = "tar.zst";
file = "gitea.tar.zst";
backupDir = "/var/backup";
interval = "01:30";
};
settings = {
server = {
ROOT_URL = "https://git.broccoli.town/";
HTTP_PORT = 3030;
HTTP_ADDR = "127.0.0.1";
DOMAIN = "git.broccoli.town";
};
service = {
REGISTER_EMAIL_CONFIRM = true;
DISABLE_REGISTRATION = true;
ENABLE_NOTIFY_MAIL = true;
DEFAULT_KEEP_EMAIL_PRIVATE = true;
};
repository = {
ENABLE_PUSH_CREATE_USER = true;
};
mailer = {
ENABLED = true;
FROM = "gitea@broccoli.town";
SMTP_ADDR = "smtp.sendgrid.net";
SMTP_PORT = 587;
USER = "apikey";
};
};
mailerPasswordFile = config.age.secrets.sendmail_email_key_gitea.path;
};
}