initial commit
Some checks failed
Nix CI / build (push) Failing after 31s

This commit is contained in:
Rustam Efimov 2026-04-01 08:50:01 +03:00
commit 30ce0dafc2
No known key found for this signature in database
195 changed files with 8902 additions and 0 deletions

37
services/forgejo/mail.nix Normal file
View file

@ -0,0 +1,37 @@
{
config,
pkgs,
lib,
sec,
...
}:
let
inherit (config.machine.forgejo) domain;
address = "noreply@${domain}";
in
with lib; mkIf config.machine.mail.enable {
services.forgejo = {
secrets = {
mailer.PASSWD = sec."mail/servicePassword".path;
};
settings.mailer = {
ENABLED = true;
FROM = address;
USER = address;
SMTP_ADDR = config.machine.mail.fqdn;
SMTP_PORT = 465;
PROTOCOL = "smtps";
SENDMAIL_PATH = "${pkgs.system-sendmail}/bin/sendmail";
SEND_AS_PLAIN_TEXT = true;
};
};
mailserver = {
domains = [ domain ];
accounts.${address} = {
hashedPasswordFile = sec."mail/serviceHashedPassword".path;
aliases = [ ];
sendOnly = true;
};
};
}