summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common.nix65
m---------home-manager0
-rwxr-xr-xnotmuch-hook.sh39
3 files changed, 64 insertions, 40 deletions
diff --git a/common.nix b/common.nix
index 991889e..03ad541 100644
--- a/common.nix
+++ b/common.nix
@@ -282,7 +282,16 @@ in
msmtp-queue -r
mbsync --all
'';
- postNew = builtins.readFile ./notmuch-hook.sh;
+ postNew = ''
+ notmuch tag -inbox +haskell -- to:haskell-cafe@haskell.org
+ notmuch tag -inbox +clojure -- to:clojure@googlegroups.com
+ notmuch tag -inbox +ai -- to:scikit-learn@python.org OR to:tensorflow.org
+ notmuch tag -inbox +bitcoin -- to:bitcoin-dev@lists.linuxfoundation.org OR to:bitcoin-discuss@lists.linuxfoundation.org
+ notmuch tag -inbox +diybio -- to:diybio@googlegroups.com
+ notmuch tag -inbox +meetups -- from:meetup.com
+ afew -tn
+ '';
+
};
extraConfig = {
search = {
@@ -291,6 +300,60 @@ in
};
};
+ afew = {
+ enable = true;
+ extraConfig = ''
+ [ArchiveSentMailsFilter]
+
+ [SpamFilter]
+ spam_tag = spam
+
+ # This filter looks for the List-Id header, and if it finds it, adds a
+ # tag lists and a tag named lists/<list-id>.
+ [ListMailsFilter]
+
+ [Filter.0]
+ message = mobile todos
+ query = 'from:ben@bsima.me AND to:ben@bsima.me AND subject:TODO'
+ tags = +todo;-inbox;+unread
+
+ [Filter.1]
+ message = logwatch
+ query = subject:Logwatch
+ tags = +logwatch;-new;-inbox
+
+ [Filter.2]
+ message = newsletters
+ query =
+ from:the-morning-paper@onelanday.co.uk OR
+ from:newsletter@fightaging.org OR
+ from:newsletter@fightaging.org or
+ subject:'The Reading List Email*' OR
+ from:info@haskellweekly.news OR
+ from:kale@hackernewsletter.com OR
+ from:newsletter@farnamstreetblog.com
+ tags = -unread +deals
+
+ [Filter.3]
+ message = job emails
+ query =
+ from:alist.co OR
+ from:angel.co OR
+ from:stackoverflow.com OR
+ from:stackoverflow.email OR
+ from:cdmtechnology.com OR
+ subject:job
+ tags = +jobs;-inbox
+
+ [Filter.4]
+ message = github
+ query = from:github.com
+ tags = +github;-inbox
+
+ [InboxFilter]
+ '';
+ };
+
mbsync = {
enable = true;
};
diff --git a/home-manager b/home-manager
-Subproject fafd60f12848b62d09062b9fe0344e6b00d4764
+Subproject dae9ff64d0f650d92926c299e08a59b78d37ae0
diff --git a/notmuch-hook.sh b/notmuch-hook.sh
deleted file mode 100755
index a5a7f7e..0000000
--- a/notmuch-hook.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/usr/bin/env sh
-
-# tag all messages from "me" as sent
-notmuch tag +sent -inbox -unread -- from:ben@bsima.me
-
-# tag TODOs from myself, always mark as unread so I'm forced to process them
-notmuch tag +todo -inbox +unread -- subject:TODO and from:ben@bsima.me and to:ben@bsima.me
-
-# tag some newsletters, but don't show them in inbox
-notmuch tag +newsletters -inbox -- \
- from:the-morning-paper@onelanday.co.uk or \
- from:newsletter@fightaging.org or \
- subject:'The Reading List Email*' or \
- from:info@haskellweekly.news or \
- from:kale@hackernewsletter.com \
- from:newsletter@farnamstreetblog.com
-
-# tag logwatch emails & remove from inbox
-notmuch tag +logwatch -new -inbox -- subject:'Logwatch*'
-
-# tag job-related emails
-notmuch tag +jobs -inbox -- \
- from:alist.co or \
- from:angel.co or \
- from:stackoverflow.com or \
- from:stackoverflow.email or \
- from:cdmtechnology.com or \
- subject:job
-
-# tag github emails
-notmuch tag +github -inbox -- from:github.com
-
-## mailing lists
-notmuch tag -inbox +haskell -- to:haskell-cafe@haskell.org
-notmuch tag -inbox +clojure -- to:clojure@googlegroups.com
-notmuch tag -inbox +ai -- to:scikit-learn@python.org OR to:tensorflow.org
-notmuch tag -inbox +bitcoin -- to:bitcoin-dev@lists.linuxfoundation.org OR to:bitcoin-discuss@lists.linuxfoundation.org
-notmuch tag -inbox +diybio -- to:diybio@googlegroups.com
-notmuch tag -inbox +meetups -- from:meetup.com