add afew config
This commit is contained in:
parent
a9c809acc9
commit
88def33df2
2 changed files with 22 additions and 3 deletions
|
@ -46,8 +46,8 @@ desktop: {pkgs, ...}: {
|
|||
onNotify = "${pkgs.isync}/bin/mbsync -a || true";
|
||||
onNotifyPost =
|
||||
if desktop
|
||||
then "${pkgs.notmuch}/bin/notmuch new && ${pkgs.libnotify}/bin/notify-send 'New mail arrived'"
|
||||
else "${pkgs.notmuch}/bin/notmuch new";
|
||||
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 && ${pkgs.afew}/bin/afew --tag --new";
|
||||
};
|
||||
smtp.host = "mail.chir.rs";
|
||||
address = "lotte@chir.rs";
|
||||
|
|
|
@ -2,7 +2,10 @@
|
|||
in {
|
||||
services.imapnotify.enable = true;
|
||||
programs.mbsync.enable = true;
|
||||
programs.notmuch.enable = true;
|
||||
programs.notmuch = {
|
||||
enable = true;
|
||||
new.tags = ["new"];
|
||||
};
|
||||
programs.alot = {
|
||||
enable = true;
|
||||
hooks = builtins.readFile ./hooks.py;
|
||||
|
@ -26,4 +29,20 @@ in {
|
|||
image/*; ${pkgs.imv}/bin/imv '%s'
|
||||
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
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue