nix-config/dots/email/default.nix

79 lines
1.5 KiB
Nix
Raw Permalink Normal View History

2024-11-10 17:54:08 -05:00
{ pkgs, ... }:
{
accounts.email = {
maildirBasePath = "mail";
accounts.fastmail = {
primary = true;
address = "tyler@tdback.net";
userName = "tyler@tdback.net";
realName = "Tyler Dunneback";
passwordCommand = "${pkgs.age}/bin/age -d -i ~/.ssh/email ~/vault/mail.age";
folders = {
inbox = "Inbox";
drafts = "Drafts";
sent = "Sent";
trash = "Trash";
};
imap = {
host = "imap.fastmail.com";
port = 993;
tls = {
enable = true;
certificatesFile = "/etc/ssl/certs/ca-certificates.crt";
};
};
smtp = {
host = "smtp.fastmail.com";
port = 465;
tls = {
enable = true;
useStartTls = false;
certificatesFile = "/etc/ssl/certs/ca-certificates.crt";
};
};
mbsync = {
enable = true;
create = "both";
expunge = "none";
subFolders = "Verbatim";
patterns = [ "*" ];
};
msmtp = {
enable = true;
extraConfig = {
logfile = "~/.cache/msmtp/msmtp.log";
};
};
neomutt = {
enable = true;
sendMailCommand = "msmtp";
mailboxType = "maildir";
extraMailboxes = [
"Drafts"
"Sent"
"Trash"
"Archive"
];
};
};
};
programs = {
mbsync.enable = true;
msmtp.enable = true;
};
services.mbsync = {
enable = true;
package = pkgs.isync;
frequency = "*:0/5";
};
}