2022-06-12 15:39:15 +00:00
|
|
|
{pkgs, ...}: let
|
|
|
|
in {
|
2022-01-19 13:56:46 +00:00
|
|
|
services.imapnotify.enable = true;
|
|
|
|
programs.mbsync.enable = true;
|
2022-06-29 08:33:49 +00:00
|
|
|
programs.notmuch = {
|
|
|
|
enable = true;
|
|
|
|
new.tags = ["new"];
|
|
|
|
};
|
2022-06-28 18:40:04 +00:00
|
|
|
programs.alot = {
|
2022-01-19 13:56:46 +00:00
|
|
|
enable = true;
|
2022-06-28 20:12:44 +00:00
|
|
|
hooks = builtins.readFile ./hooks.py;
|
2022-06-28 20:11:55 +00:00
|
|
|
bindings = {
|
|
|
|
envelope = {
|
|
|
|
k = "call hooks.attach_my_key(ui)";
|
|
|
|
K = "call hooks.attach_keys(ui)";
|
|
|
|
"control k" = "call hooks.attach_recipient_keys(ui)";
|
|
|
|
};
|
|
|
|
thread = {
|
2022-06-28 20:12:44 +00:00
|
|
|
k = "call hooks.import_keys(ui)";
|
2022-06-28 20:11:55 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
settings = {
|
2022-06-28 20:13:29 +00:00
|
|
|
envelope_txt2html = "${pkgs.pandoc}/bin/pandoc -f markdown -t html -s --self-contained --template=${../../extra/GitHub.html5}";
|
2022-06-28 20:12:44 +00:00
|
|
|
envelope_html2txt = "${pkgs.pandoc}/bin/pandoc -t markdown -f html";
|
2022-06-28 20:11:55 +00:00
|
|
|
};
|
2022-01-19 13:56:46 +00:00
|
|
|
};
|
2022-01-19 14:48:24 +00:00
|
|
|
programs.msmtp.enable = true;
|
2022-06-28 20:27:13 +00:00
|
|
|
home.file.".mailcap".text = ''
|
2022-06-29 07:01:21 +00:00
|
|
|
image/*; ${pkgs.imv}/bin/imv '%s'
|
2022-06-28 20:27:13 +00:00
|
|
|
text/html; ${pkgs.w3m}/bin/w3m -dump -o document_charset=%{charset} '%s'; nametemplate=%s.html; copiousoutput
|
|
|
|
'';
|
2022-06-29 08:33:49 +00:00
|
|
|
programs.afew = {
|
|
|
|
enable = true;
|
|
|
|
extraConfig = ''
|
|
|
|
[ArchiveSentMailsFilter]
|
|
|
|
[DMARCReportInspectionFilter]
|
|
|
|
[HeaderMatchingFilter.1]
|
|
|
|
header = X-Spam
|
|
|
|
pattern = Yes
|
|
|
|
tags = +spam
|
|
|
|
[KillThreadsFilter]
|
|
|
|
[ListMailsFilter]
|
|
|
|
[Filter.0]
|
|
|
|
query = tag:new
|
|
|
|
tags = +inbox;+unread;-new
|
|
|
|
'';
|
|
|
|
};
|
2022-01-19 13:56:46 +00:00
|
|
|
}
|