diff options
author | jeschli <jeschli@gmail.com> | 2018-02-28 20:10:42 +0000 |
---|---|---|
committer | jeschli <jeschli@gmail.com> | 2018-02-28 20:10:42 +0000 |
commit | a7e49dd5fc590ba2ccb26d559d672767c87a7692 (patch) | |
tree | 3d0fb66d17085f1288037da1b4d9987fa402e40e /lass/2configs/mail.nix | |
parent | 4a2af184e6846f80b139357c6230558cd8785b10 (diff) | |
parent | 4c0d0f64ed21d3d7292bb5e8900d973e649375c1 (diff) |
Merge branch 'staging/jeschli' of prism.i:stockholm into staging/jeschli
Diffstat (limited to 'lass/2configs/mail.nix')
-rw-r--r-- | lass/2configs/mail.nix | 44 |
1 files changed, 27 insertions, 17 deletions
diff --git a/lass/2configs/mail.nix b/lass/2configs/mail.nix index 962efaf3f..c6866c69d 100644 --- a/lass/2configs/mail.nix +++ b/lass/2configs/mail.nix @@ -1,3 +1,4 @@ +with import <stockholm/lib>; { pkgs, ... }: let @@ -19,6 +20,22 @@ let text/html; ${pkgs.elinks}/bin/elinks -dump ; copiousoutput; ''; + mailboxes = { + c-base = [ "to:c-base.org" ]; + dezentrale = [ "to:dezentrale.space" ]; + kaosstuff = [ "to:gearbest@lassul.us" "to:banggood@lassul.us" ]; + nix-devel = [ "to:nix-devel@googlegroups.com" ]; + patreon = [ "to:patreon@lassul.us" ]; + security = [ "to:seclists.org" "to:security" "to:bugtraq" ]; + shack = [ "to:shackspace.de" ]; + wireguard = [ "to:wireguard@lists.zx2c4" ]; + }; + + tag-mails = pkgs.writeDashBin "nm-init-tag" '' + ${pkgs.notmuch}/bin/notmuch new + ${concatMapStringsSep "\n" (i: ''${pkgs.notmuch}/bin/notmuch tag -inbox +${i.name} -- tag:inbox ${concatMapStringsSep " or " (f: "${f}") i.value}'') (mapAttrsToList nameValuePair mailboxes)} + ''; + muttrc = pkgs.writeText "muttrc" '' # gpg source ${pkgs.neomutt}/share/doc/mutt/samples/gpg.rc @@ -71,23 +88,15 @@ let # V ''} %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" + virtual-mailboxes "INBOX" "notmuch://?query=tag:inbox" + virtual-mailboxes "Unread" "notmuch://?query=tag:unread" + ${concatMapStringsSep "\n" (i: ''${" "}virtual-mailboxes "${i.name}" "notmuch://?query=tag:${i.name}"'') (mapAttrsToList nameValuePair mailboxes)} + virtual-mailboxes "TODO" "notmuch://?query=tag:TODO" + virtual-mailboxes "Starred" "notmuch://?query=tag:*" + virtual-mailboxes "Archive" "notmuch://?query=tag:archive" + virtual-mailboxes "Sent" "notmuch://?query=tag:sent" + virtual-mailboxes "Junk" "notmuch://?query=tag:junk" + virtual-mailboxes "All" "notmuch://?query=*" tag-transforms "junk" "k" \ "unread" "u" \ @@ -161,5 +170,6 @@ in { mutt pkgs.much pkgs.notmuch + tag-mails ]; } |