nix-configs/modules/common/msmtp.nix
2024-05-30 22:08:27 -04:00

26 lines
571 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";
};
};
}