l mail: template with nix

This commit is contained in:
lassulus 2018-01-23 23:21:47 +01:00
parent 2613e485da
commit 7368b6a9da

View File

@ -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" \