add mailer settings to forgejo
This commit is contained in:
parent
05ac7b8bc4
commit
1837cfacb3
1 changed files with 18 additions and 0 deletions
18
forgejo.nix
18
forgejo.nix
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
domainName,
|
domainName,
|
||||||
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
|
|
@ -16,7 +17,16 @@
|
||||||
};
|
};
|
||||||
session.COOKIE_SECURE = true;
|
session.COOKIE_SECURE = true;
|
||||||
service.DISABLE_REGISTRATION = 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}" = {
|
nginx.virtualHosts."git.${domainName}" = {
|
||||||
forceSSL = true;
|
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";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue