add mailer settings to forgejo

This commit is contained in:
Yisroel Baum 2026-05-14 10:06:05 +03:00
parent 05ac7b8bc4
commit 1837cfacb3
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9

View file

@ -1,5 +1,6 @@
{
domainName,
config,
...
}:
{
@ -16,7 +17,16 @@
};
session.COOKIE_SECURE = true;
service.DISABLE_REGISTRATION = true;
mailer = {
ENABLED = true;
SMTP_ADDR = "in-v3.mailjet.com";
SMTP_PORT = 587;
FROM = "noreply@forgejo.${domainName}";
# USER and PASSWD come from secrets below
};
};
secrets.mailer.USER = config.sops.secrets."forgejo-mailer-user".path;
secrets.mailer.PASSWD = config.sops.secrets."forgejo-mailer-passwd".path;
};
nginx.virtualHosts."git.${domainName}" = {
forceSSL = true;
@ -37,4 +47,12 @@
};
};
};
sops.secrets."forgejo-mailer-user" = {
sopsFile = ./secrets/forgejo.yaml;
mode = "0400";
};
sops.secrets."forgejo-mailer-passwd" = {
sopsFile = ./secrets/forgejo.yaml;
mode = "0400";
};
}