global/general: setup msmtp with noreply email

This commit is contained in:
Infinidoge 2025-01-16 14:10:34 -05:00
parent f671ab914d
commit 4dfa32ffd4
Signed by: Infinidoge
SSH key fingerprint: SHA256:oAMyvotlNFraMmZmr+p6AxnNfW/GioTs1pOn3V4tQ7A
2 changed files with 22 additions and 4 deletions

View file

@ -1,4 +1,4 @@
{ config, lib, ... }:
{ config, common, secrets, lib, ... }:
{
programs = {
# Enable dconf for programs that need it
@ -38,4 +38,24 @@
home-manager.sharedModules = [
{ programs.man.generateCaches = lib.mkForce false; }
];
programs.msmtp = with common.email; {
enable = true;
setSendmail = true;
defaults = {
host = smtp.address;
port = smtp.STARTTLS;
tls = true;
auth = true;
};
accounts = rec {
noreply = {
user = outgoing;
passwordeval = "cat ${secrets.smtp-password}";
};
default = noreply // {
from = withSubaddress "%U-%H";
};
};
};
}