33 lines
876 B
Nix
33 lines
876 B
Nix
|
# SPDX-FileCopyrightText: 2024 Simon Bruder <simon@sbruder.de>
|
||
|
#
|
||
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||
|
{ config, pkgs, ... }:
|
||
|
|
||
|
{
|
||
|
sops.secrets.system-mail.sopsFile = ../secrets/local-mail.yaml;
|
||
|
|
||
|
programs.msmtp = {
|
||
|
enable = true;
|
||
|
setSendmail = true;
|
||
|
accounts.default = {
|
||
|
host = "vueko.sbruder.de";
|
||
|
port = "465";
|
||
|
tls = "on";
|
||
|
tls_starttls = "off";
|
||
|
from = ''"system+%U@%H"@sbruder.de'';
|
||
|
allow_from_override = "off";
|
||
|
auth = "on";
|
||
|
user = "system@sbruder.de";
|
||
|
passwordeval = "cat ${config.sops.secrets.system-mail.path}";
|
||
|
aliases = pkgs.writeText "msmtp-aliases" ''
|
||
|
default: simon@sbruder.de
|
||
|
'';
|
||
|
};
|
||
|
};
|
||
|
|
||
|
boot.swraid.mdadmConf = ''
|
||
|
MAILFROM "mdadm on ${config.networking.hostName}" <"system+root@${config.networking.hostName}"@sbruder.de>
|
||
|
MAILADDR simon@sbruder.de
|
||
|
'';
|
||
|
}
|