nixos/home/email/default.nix

82 lines
2 KiB
Nix
Raw Normal View History

2024-01-30 14:21:50 +00:00
{
pkgs,
hostName,
...
}: {
accounts.email = {
2023-10-23 23:55:52 +01:00
maildirBasePath = "Mail";
2024-01-30 14:21:50 +00:00
accounts = let
realName = "Evie Litherland-Smith";
in {
proton = let
host = "127.0.0.1";
tls.enable = false;
in rec {
inherit realName;
primary = true;
maildir.path = "Proton";
imap = {
inherit host tls;
port = 1143;
};
smtp = {
inherit host tls;
port = 1025;
};
address = "e.litherlandsmith@proton.me";
2024-01-30 14:21:50 +00:00
aliases = ["evie@xenia.me.uk" "evie@litherlandsmith.slmail.me"];
userName = address;
2024-01-30 14:21:50 +00:00
passwordCommand = "${pkgs.pass}/bin/pass show mbsync/${hostName}/proton | head -n1";
mu.enable = true;
2024-02-29 14:16:34 +00:00
msmtp = {
enable = true;
2024-02-29 14:16:34 +00:00
extraConfig = {
tls = "off";
auth = "login";
};
};
mbsync = {
enable = true;
create = "both";
expunge = "both";
remove = "both";
2024-01-30 14:21:50 +00:00
patterns = ["*" "!All Mail" "!Labels*" "!Starred" "!Recovered Messages"];
subFolders = "Verbatim";
extraConfig.account.AuthMechs = "LOGIN";
};
};
icloud = rec {
inherit realName;
primary = false;
maildir.path = "iCloud";
imap.host = "imap.mail.me.com";
smtp.host = "smtp.mail.me.com";
address = "e.litherlandsmith@icloud.com";
userName = address;
2024-01-30 14:21:50 +00:00
passwordCommand = "${pkgs.pass}/bin/pass show mbsync/${hostName}/icloud | head -n1";
mu.enable = true;
msmtp.enable = true;
mbsync = {
enable = true;
create = "both";
expunge = "both";
remove = "both";
2024-01-30 14:21:50 +00:00
patterns = ["*" "!Notes"];
subFolders = "Verbatim";
};
};
};
};
programs = {
mu.enable = true;
msmtp.enable = true;
mbsync = {
enable = true;
groups.inboxes = {
2024-01-30 14:21:50 +00:00
proton = ["INBOX"];
icloud = ["INBOX"];
2023-10-01 09:17:45 +01:00
};
};
};
}