From 9c8c17c7c8f4031d450605c91f2906fd445cf73d Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 13 Feb 2018 17:28:25 +0100 Subject: l mail: refactor --- lass/2configs/mail.nix | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'lass/2configs/mail.nix') diff --git a/lass/2configs/mail.nix b/lass/2configs/mail.nix index 7c58e8c5f..e83201cd8 100644 --- a/lass/2configs/mail.nix +++ b/lass/2configs/mail.nix @@ -21,11 +21,11 @@ let ''; mailboxes = { - wireguard = [ "wireguard@lists.zx2c4" ]; - c-base = [ "c-base.org" ]; - security = [ "seclists.org" "security" "bugtraq" ]; - nix-devel = [ "nix-devel@googlegroups.com" ]; - shack = [ "shackspace.de" ]; + wireguard = [ "to:wireguard@lists.zx2c4" ]; + c-base = [ "to:c-base.org" ]; + security = [ "to:seclists.org" "to:security" "to:bugtraq" ]; + nix-devel = [ "to:nix-devel@googlegroups.com" ]; + shack = [ "to:shackspace.de" ]; }; muttrc = pkgs.writeText "muttrc" '' @@ -80,16 +80,16 @@ let # V ''} %r |" - virtual-mailboxes \ - "Unread" "notmuch://?query=tag:unread"\ - "INBOX" "notmuch://?query=tag:inbox ${concatMapStringsSep " " (f: "and NOT to:${f}") (flatten (attrValues mailboxes))}"\ - ${concatMapStringsSep "\n" (i: ''${" "}"${i.name}" "notmuch://?query=${concatMapStringsSep " or " (f: "to:${f}") i.value}"\'') (mapAttrsToList nameValuePair mailboxes)} - "BOX" "notmuch://?query=${concatMapStringsSep " and " (f: "NOT to:${f}") (flatten (attrValues mailboxes))}"\ - "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 ${concatMapStringsSep " " (f: "and NOT ${f}") (flatten (attrValues mailboxes))}" + virtual-mailboxes "Unread" "notmuch://?query=tag:unread" + ${concatMapStringsSep "\n" (i: ''${" "}virtual-mailboxes "${i.name}" "notmuch://?query=${concatMapStringsSep " or " (f: "${f}") i.value}"'') (mapAttrsToList nameValuePair mailboxes)} + virtual-mailboxes "BOX" "notmuch://?query=${concatMapStringsSep " and " (f: "NOT ${f}") (flatten (attrValues 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" \ -- cgit v1.2.3 From 2d6f67e5358b1c60b7e778e3844f84434c0140e0 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 25 Feb 2018 23:32:59 +0100 Subject: l mail: use tags for mailboxes --- lass/2configs/mail.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'lass/2configs/mail.nix') diff --git a/lass/2configs/mail.nix b/lass/2configs/mail.nix index e83201cd8..2cf20b32c 100644 --- a/lass/2configs/mail.nix +++ b/lass/2configs/mail.nix @@ -28,6 +28,11 @@ let shack = [ "to:shackspace.de" ]; }; + 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 @@ -80,10 +85,9 @@ let # V ''} %r |" - virtual-mailboxes "INBOX" "notmuch://?query=tag:inbox ${concatMapStringsSep " " (f: "and NOT ${f}") (flatten (attrValues mailboxes))}" + virtual-mailboxes "INBOX" "notmuch://?query=tag:inbox" virtual-mailboxes "Unread" "notmuch://?query=tag:unread" - ${concatMapStringsSep "\n" (i: ''${" "}virtual-mailboxes "${i.name}" "notmuch://?query=${concatMapStringsSep " or " (f: "${f}") i.value}"'') (mapAttrsToList nameValuePair mailboxes)} - virtual-mailboxes "BOX" "notmuch://?query=${concatMapStringsSep " and " (f: "NOT ${f}") (flatten (attrValues mailboxes))}" + ${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" @@ -163,5 +167,6 @@ in { mutt pkgs.much pkgs.notmuch + tag-mails ]; } -- cgit v1.2.3 From 5b9fe77d8f163c64f4c8960db8ebeadba2c5407c Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 25 Feb 2018 23:33:15 +0100 Subject: l mail: add more mailboxes --- lass/2configs/mail.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lass/2configs/mail.nix') diff --git a/lass/2configs/mail.nix b/lass/2configs/mail.nix index 2cf20b32c..c6866c69d 100644 --- a/lass/2configs/mail.nix +++ b/lass/2configs/mail.nix @@ -21,11 +21,14 @@ let ''; mailboxes = { - wireguard = [ "to:wireguard@lists.zx2c4" ]; c-base = [ "to:c-base.org" ]; - security = [ "to:seclists.org" "to:security" "to:bugtraq" ]; + 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" '' -- cgit v1.2.3 From 58a21e21e262c6edea2aefff0d8ca772a7e3ea70 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 3 Mar 2018 18:36:58 +0100 Subject: l mail: add more mailboxes --- lass/2configs/mail.nix | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) (limited to 'lass/2configs/mail.nix') diff --git a/lass/2configs/mail.nix b/lass/2configs/mail.nix index c6866c69d..03d39ef75 100644 --- a/lass/2configs/mail.nix +++ b/lass/2configs/mail.nix @@ -22,20 +22,45 @@ let mailboxes = { c-base = [ "to:c-base.org" ]; + coins = [ + "to:btce@lassul.us" + "to:coinbase@lassul.us" + "to:polo@lassul.us" + "to:bitwala@lassul.us" + "to:payeer@lassul.us" + "to:gatehub@lassul.us" + "to:bitfinex@lassul.us" + "to:binance@lassul.us" + "to:bitcoin.de@lassul.us" + "to:robinhood@lassul.us" + ]; dezentrale = [ "to:dezentrale.space" ]; - kaosstuff = [ "to:gearbest@lassul.us" "to:banggood@lassul.us" ]; + dhl = [ "to:dhl@lassul.us" ]; + github = [ "to:github@lassul.us" ]; + gmail = [ "to:gmail@lassul.us" "to:lassulus@gmail.com" "lassulus@googlemail.com" ]; + kaosstuff = [ "to:gearbest@lassul.us" "to:banggood@lassul.us" "to:tomtop@lassul.us" ]; nix-devel = [ "to:nix-devel@googlegroups.com" ]; patreon = [ "to:patreon@lassul.us" ]; - security = [ "to:seclists.org" "to:security" "to:bugtraq" ]; + paypal = [ "to:paypal@lassul.us" ]; + ptl = [ "to:ptl@posttenebraslab.ch" ]; + retiolum = [ "to:lass@mors.r" ]; + security = [ "to:seclists.org" "to:bugtraq" "to:securityfocus@lassul.us" ]; shack = [ "to:shackspace.de" ]; + steam = [ "to:steam@lassul.us" ]; + tinc = [ "to:tinc@tinc-vpn.org" "to:tinc-devel@tinc-vpn.org" ]; wireguard = [ "to:wireguard@lists.zx2c4" ]; + zzz = [ "to:pizza@lassul.us" "to:spam@krebsco.de" ]; }; - tag-mails = pkgs.writeDashBin "nm-init-tag" '' + tag-new-mails = pkgs.writeDashBin "nm-tag-init" '' ${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)} ''; + tag-old-mails = pkgs.writeDashBin "nm-tag-old" '' + ${concatMapStringsSep "\n" (i: ''${pkgs.notmuch}/bin/notmuch tag -inbox -archive +${i.name} -- ${concatMapStringsSep " or " (f: "${f}") i.value}'') (mapAttrsToList nameValuePair mailboxes)} + ''; + muttrc = pkgs.writeText "muttrc" '' # gpg source ${pkgs.neomutt}/share/doc/mutt/samples/gpg.rc @@ -170,6 +195,7 @@ in { mutt pkgs.much pkgs.notmuch - tag-mails + tag-new-mails + tag-old-mails ]; } -- cgit v1.2.3