forgejo: init mailer

This commit is contained in:
notohh 2023-12-30 11:58:26 -05:00
parent 8070852806
commit 5155280203
Signed by: notohh
GPG key ID: BD47506D475EE86D

View file

@ -1,14 +1,20 @@
{lib, ...}: { {
lib,
config,
...
}: {
sops.secrets.smtp2go-pwd = {owner = "forgejo";};
networking.firewall.allowedTCPPorts = [2222]; networking.firewall.allowedTCPPorts = [2222];
services.forgejo = { services.forgejo = {
enable = true; enable = true;
stateDir = "/var/lib/forgejo"; stateDir = "/var/lib/forgejo";
settings = { settings = {
service.DISABLE_REGISTRATION = true; service.DISABLE_REGISTRATION = false;
DEFAULT.APP_NAME = "forgejo"; DEFAULT.APP_NAME = "forgejo";
log.LEVEL = "Debug"; log.LEVEL = "Debug";
ui = { ui = {
DEFAULT_THEME = "forgejo-dark"; DEFAULT_THEME = "forgejo-dark";
SHOW_USER_EMAIL = true;
}; };
actions = { actions = {
ENABLED = true; ENABLED = true;
@ -42,6 +48,15 @@
ENABLED_ISSUE_BY_REPOSITORY = true; ENABLED_ISSUE_BY_REPOSITORY = true;
ENABLED_ISSUE_BY_LABEL = true; ENABLED_ISSUE_BY_LABEL = true;
}; };
mailer = {
ENABLED = true;
FROM = "forgejo@flake.sh";
PROTOCOL = "smtp+starttls";
SMTP_ADDR = "mail.smtp2go.com";
SMTP_PORT = 587;
USER = "forgejo-mailer";
};
}; };
mailerPasswordFile = config.sops.secrets.smtp2go-pwd.path;
}; };
} }