feat : Add mailer in forgejo
This commit is contained in:
parent
7506073727
commit
efdb1794be
5 changed files with 63 additions and 34 deletions
|
|
@ -1,20 +1,40 @@
|
|||
{ config,lib, ... }:
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.services.forgejo;
|
||||
srv = cfg.settings.server;
|
||||
in
|
||||
{
|
||||
age.secrets = lib.mkIf config.services.forgejo.enable {
|
||||
# Keep your secret definitions as they are
|
||||
YfDrVBDJcVoYNZeJ.file = ../secrets/cache/YfDrVBDJcVoYNZeJ;
|
||||
kuc8wgd09HbRU99u.file = ../secrets/cache/kuc8wgd09HbRU99u;
|
||||
XNkwPolezNRELmWu.file = ../secrets/cache/XNkwPolezNRELmWu;
|
||||
};
|
||||
|
||||
services.forgejo = {
|
||||
enable = true;
|
||||
database.type = "postgres";
|
||||
# Enable support for Git Large File Storage
|
||||
lfs.enable = true;
|
||||
|
||||
secrets.mailer = {
|
||||
PASSWD = config.age.secrets.XNkwPolezNRELmWu.path;
|
||||
USER = config.age.secrets.kuc8wgd09HbRU99u.path;
|
||||
SMTP_ADDR = config.age.secrets.YfDrVBDJcVoYNZeJ.path;
|
||||
};
|
||||
|
||||
settings = {
|
||||
service.DISABLE_REGISTRATION = true;
|
||||
|
||||
server = {
|
||||
DOMAIN = "git.${config.module.domain}";
|
||||
# You need to specify this to remove the port from URLs in the web UI.
|
||||
ROOT_URL = "https://${srv.DOMAIN}/";
|
||||
ROOT_URL = "https://git.${config.module.domain}/";
|
||||
HTTP_PORT = config.module.forgejo.internalPort;
|
||||
};
|
||||
|
||||
mailer = {
|
||||
ENABLED = true;
|
||||
SMTP_PORT = 465;
|
||||
PROTOCOL = "smtps";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue