1
0
Fork 0

Services: fix msmtp

This commit is contained in:
Aires 2024-08-16 15:41:13 -04:00
parent 446c0afd75
commit 0e27201be5

View file

@ -12,6 +12,7 @@ in
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
programs.msmtp = { programs.msmtp = {
enable = true; enable = true;
defaults.aliases = "/etc/aliases";
accounts.default = { accounts.default = {
host = config.secrets.services.msmtp.host; host = config.secrets.services.msmtp.host;
user = config.secrets.services.msmtp.user; user = config.secrets.services.msmtp.user;
@ -21,8 +22,15 @@ in
tls_starttls = true; tls_starttls = true;
port = 587; port = 587;
from = "${config.networking.hostName}@${config.secrets.networking.primaryDomain}"; from = "${config.networking.hostName}@${config.secrets.networking.primaryDomain}";
to = config.secrets.users.aires.email;
}; };
}; };
# Send all mail to my email address by default
environment.etc."aliases" = {
text = ''
default: ${config.secrets.users.aires.email}
'';
mode = "0644";
};
}; };
} }