summaryrefslogtreecommitdiffstats
path: root/lass/2configs
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2018-01-23 23:21:47 +0100
committerlassulus <lassulus@lassul.us>2018-01-23 23:21:47 +0100
commit7368b6a9dace5de4a798100066b3583faabb6f7b (patch)
tree26cf73a318b8e477c1701dd1e1318a93d549b243 /lass/2configs
parent2613e485dab4f819aa61afbab223f19273dc4f07 (diff)
l mail: template with nix
Diffstat (limited to 'lass/2configs')
-rw-r--r--lass/2configs/mail.nix34
1 files changed, 18 insertions, 16 deletions
diff --git a/lass/2configs/mail.nix b/lass/2configs/mail.nix
index 962efaf3f..a26f3fcbb 100644
--- a/lass/2configs/mail.nix
+++ b/lass/2configs/mail.nix
@@ -1,3 +1,4 @@
+with import <stockholm/lib>;
{ pkgs, ... }:
let
@@ -19,6 +20,14 @@ let
text/html; ${pkgs.elinks}/bin/elinks -dump ; copiousoutput;
'';
+ inboxes = [
+ { l = "wireguard"; q = [ "wireguard@lists.zx2c4" ]; }
+ { l = "c-base"; q = [ "c-base.org" ]; }
+ { l = "security"; q = [ "seclists.org" "security" "bugtraq" ]; }
+ { l = "nix-devel"; q = [ "nix-devel@googlegroups.com" ]; }
+ { l = "shack"; q = [ "shackspace.de" ]; }
+ ];
+
muttrc = pkgs.writeText "muttrc" ''
# gpg
source ${pkgs.neomutt}/share/doc/mutt/samples/gpg.rc
@@ -72,22 +81,15 @@ let
''} %r |"
virtual-mailboxes \
- "Unread" "notmuch://?query=tag:unread"\
- "INBOX" "notmuch://?query=tag:inbox \
- and NOT to:nix-devel\
- and NOT to:shackspace\
- and NOT to:security\
- and NOT to:c-base" \
- "shack" "notmuch://?query=to:shackspace"\
- "c-base" "notmuch://?query=to:c-base"\
- "security" "notmuch://?query=to:securityfocus or from:security-alert@hpe.com"\
- "nix" "notmuch://?query=to:nix-devel"\
- "radio" "notmuch://?query=to:radio or tag:radio"\
- "TODO" "notmuch://?query=tag:TODO"\
- "Starred" "notmuch://?query=tag:*"\
- "Archive" "notmuch://?query=tag:archive"\
- "Sent" "notmuch://?query=tag:sent"\
- "Junk" "notmuch://?query=tag:junk"
+ "Unread" "notmuch://?query=tag:unread"\
+ "INBOX" "notmuch://?query=tag:inbox ${concatMapStringsSep " " (f: "and NOT to:${f}") (concatMap (l: l.q) inboxes)}"\
+ ${concatMapStringsSep "\n" (i: ''${" "}"${i.l}" "notmuch://?query=${concatMapStringsSep " or " (f: "to:${f}") i.q}"\'') inboxes}
+ "BOX" "notmuch://?query=${concatMapStringsSep " and " (f: "NOT to:${f}") (concatMap (l: l.q) inboxes)}"\
+ "TODO" "notmuch://?query=tag:TODO"\
+ "Starred" "notmuch://?query=tag:*"\
+ "Archive" "notmuch://?query=tag:archive"\
+ "Sent" "notmuch://?query=tag:sent"\
+ "Junk" "notmuch://?query=tag:junk"
tag-transforms "junk" "k" \
"unread" "u" \