From 51552802033fb4219bc8ca39833f8e64dae5ff00 Mon Sep 17 00:00:00 2001 From: notohh Date: Sat, 30 Dec 2023 11:58:26 -0500 Subject: [PATCH] forgejo: init mailer --- hosts/sakura/services/forgejo.nix | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/hosts/sakura/services/forgejo.nix b/hosts/sakura/services/forgejo.nix index 29ce91f..75f7362 100644 --- a/hosts/sakura/services/forgejo.nix +++ b/hosts/sakura/services/forgejo.nix @@ -1,14 +1,20 @@ -{lib, ...}: { +{ + lib, + config, + ... +}: { + sops.secrets.smtp2go-pwd = {owner = "forgejo";}; networking.firewall.allowedTCPPorts = [2222]; services.forgejo = { enable = true; stateDir = "/var/lib/forgejo"; settings = { - service.DISABLE_REGISTRATION = true; + service.DISABLE_REGISTRATION = false; DEFAULT.APP_NAME = "forgejo"; log.LEVEL = "Debug"; ui = { DEFAULT_THEME = "forgejo-dark"; + SHOW_USER_EMAIL = true; }; actions = { ENABLED = true; @@ -42,6 +48,15 @@ ENABLED_ISSUE_BY_REPOSITORY = 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; }; }