This commit is contained in:
commit
30ce0dafc2
195 changed files with 8902 additions and 0 deletions
39
services/synapse/mail.nix
Normal file
39
services/synapse/mail.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue