nix-configs/modules/common/msmtp.nix
2024-04-26 15:27:25 -04:00

26 lines
572 B
Nix

{ config, ... }: {
sops.secrets."gmail/password" = {};
programs.msmtp = {
enable = true;
accounts.default = {
auth = true;
tls = true;
host = "smtp.gmail.com";
port = 587;
from = "${config.networking.hostName}@notification.icanttype.org";
user = "cdombroski";
passwordeval = "cat ${config.sops.secrets."gmail/password".path}";
};
defaults.aliases = "/etc/aliases";
};
environment.etc = {
"aliases" = {
text = ''
root: cdombroski@gmail.com
'';
mode = "0644";
};
};
}