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

39
services/synapse/mail.nix Normal file
View file

@ -0,0 +1,39 @@
{
config,
lib,
sec,
...
}:
let
inherit (config.machine.synapse)
enable
domain
;
address = "noreply@${domain}";
in
with lib; mkIf (enable && config.machine.mail.enable) {
services.matrix-synapse = {
settings = {
admin_contact = address;
registrations_require_3pid = [ "email" ];
email = {
smtp_host = config.machine.mail.fqdn;
smtp_port = 465;
smtp_user = address;
require_transport_security = true;
enable_tls = true;
notif_from = "RuJect Matrix <${address}>";
app_name = "RuJect Matrix";
};
};
};
mailserver = {
domains = [ domain ];
accounts.${address} = {
hashedPasswordFile = sec."mail/serviceHashedPassword".path;
aliases = [ ];
sendOnly = true;
};
};
}