From 2dff9d2b61244fed49136028d0e0f6ae3ae759cf Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Thu, 16 Jan 2025 00:13:06 -0800 Subject: modules about done --- nix/modules/home/msmtp.nix | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 nix/modules/home/msmtp.nix (limited to 'nix/modules/home/msmtp.nix') diff --git a/nix/modules/home/msmtp.nix b/nix/modules/home/msmtp.nix new file mode 100644 index 0000000..d965c18 --- /dev/null +++ b/nix/modules/home/msmtp.nix @@ -0,0 +1,25 @@ +{ lib, config, ... }: +{ + enable = lib.mkDefault config.monorepo.profiles.home.email.enable; + extraConfig = '' + # Set default values for all following accounts. + defaults + auth on + tls on + tls_trust_file /etc/ssl/certs/ca-certificates.crt + tls_certcheck off + logfile ~/.msmtp.log + + # Gmail + account ${config.monorepo.vars.userName} + host ${config.monorepo.profiles.home.email.smtpsServer} + port 587 + from ${config.monorepo.profiles.home.email.email} + user ${config.monorepo.profiles.home.email.email} + passwordeval "cat ${config.sops.secrets.mail.path}" + + + # Set a default account + account default : ${config.monorepo.vars.userName} + ''; +} -- cgit