add afew config

This commit is contained in:
Charlotte 🦝 Delenk 2022-06-29 09:33:49 +01:00
parent a9c809acc9
commit 88def33df2
Signed by: darkkirb
GPG key ID: AB2BD8DAF2E37122
2 changed files with 22 additions and 3 deletions

View file

@ -46,8 +46,8 @@ desktop: {pkgs, ...}: {
onNotify = "${pkgs.isync}/bin/mbsync -a || true"; onNotify = "${pkgs.isync}/bin/mbsync -a || true";
onNotifyPost = onNotifyPost =
if desktop if desktop
then "${pkgs.notmuch}/bin/notmuch new && ${pkgs.libnotify}/bin/notify-send 'New mail arrived'" then "${pkgs.notmuch}/bin/notmuch new && ${pkgs.afew}/bin/afew --tag --new && ${pkgs.libnotify}/bin/notify-send 'New mail arrived'"
else "${pkgs.notmuch}/bin/notmuch new"; else "${pkgs.notmuch}/bin/notmuch new && ${pkgs.afew}/bin/afew --tag --new";
}; };
smtp.host = "mail.chir.rs"; smtp.host = "mail.chir.rs";
address = "lotte@chir.rs"; address = "lotte@chir.rs";

View file

@ -2,7 +2,10 @@
in { in {
services.imapnotify.enable = true; services.imapnotify.enable = true;
programs.mbsync.enable = true; programs.mbsync.enable = true;
programs.notmuch.enable = true; programs.notmuch = {
enable = true;
new.tags = ["new"];
};
programs.alot = { programs.alot = {
enable = true; enable = true;
hooks = builtins.readFile ./hooks.py; hooks = builtins.readFile ./hooks.py;
@ -26,4 +29,20 @@ in {
image/*; ${pkgs.imv}/bin/imv '%s' image/*; ${pkgs.imv}/bin/imv '%s'
text/html; ${pkgs.w3m}/bin/w3m -dump -o document_charset=%{charset} '%s'; nametemplate=%s.html; copiousoutput text/html; ${pkgs.w3m}/bin/w3m -dump -o document_charset=%{charset} '%s'; nametemplate=%s.html; copiousoutput
''; '';
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
'';
};
} }