nixos-config/programs/desktop/pim/email.nix

76 lines
1.8 KiB
Nix
Raw Normal View History

2024-11-11 09:10:07 +00:00
{ pkgs, config, ... }:
{
accounts.email.accounts.lotte = {
address = "lotte@chir.rs";
2024-11-22 06:58:51 +00:00
gpg = {
encryptByDefault = true;
key = "B4E3D4801C49EC5E";
signByDefault = true;
};
2024-11-11 13:09:33 +00:00
imap = {
host = "imappro.zoho.eu";
port = 993;
};
2024-11-11 09:10:07 +00:00
imapnotify = {
enable = true;
onNotify = "${pkgs.isync}/bin/mbsync test-%s";
2024-11-12 13:40:54 +00:00
onNotifyPost = "${pkgs.notmuch}/bin/notmuch new && ${pkgs.libnotify}/bin/notify-send 'New mail arrived'";
2024-11-11 09:10:07 +00:00
};
mbsync = {
enable = true;
create = "both";
expunge = "both";
2024-11-25 19:33:10 +00:00
extraConfig.account = {
AuthMechs = "plain";
PipelineDepth = 128;
};
2024-11-25 07:32:12 +00:00
};
msmtp = {
enable = true;
2024-11-25 09:44:44 +00:00
extraConfig.auth = "plain";
2024-11-11 09:10:07 +00:00
};
neomutt.enable = true;
2024-11-11 09:10:07 +00:00
notmuch = {
enable = true;
neomutt = {
enable = true;
virtualMailboxes = [
{
name = "Inbox";
query = "tag:inbox";
}
];
};
};
passwordCommand = [
"${pkgs.coreutils}/bin/cat"
config.sops.secrets."accounts/email/accounts/lotte/password".path
];
realName = "Charlotte 🦝 Delenk";
2024-11-11 13:09:33 +00:00
smtp = {
host = "smtppro.zoho.eu";
port = 465;
};
2024-11-11 09:10:07 +00:00
thunderbird.enable = true;
userName = "lotte@chir.rs";
primary = true;
};
accounts.email.maildirBasePath = "Data/Maildir";
sops.secrets."accounts/email/accounts/lotte/password".sopsFile = ./secrets.yaml;
services.imapnotify.enable = true;
2024-11-22 07:02:12 +00:00
programs.mbsync.enable = true;
2024-11-11 09:10:07 +00:00
programs.notmuch.enable = true;
2024-11-11 13:45:48 +00:00
programs.neomutt.enable = true;
2024-11-11 09:10:07 +00:00
programs.thunderbird = {
enable = true;
profiles.default = {
isDefault = true;
withExternalGnupg = true;
};
};
systemd.user.services.imapnotify.Unit = {
Wants = [ "sops-nix.service" ];
After = [ "sops-nix.service" ];
};
2024-11-11 09:10:07 +00:00
}