diff options
author | Mx Kookie <kookie@spacekookie.de> | 2020-12-31 15:05:15 +0100 |
---|---|---|
committer | Mx Kookie <kookie@spacekookie.de> | 2020-12-31 15:05:15 +0100 |
commit | 1d8f1df4a395fd69d20f6c172c78ca08070d0fa3 (patch) | |
tree | 370cfa41f23357069680b04d7aaee60566354192 /infra | |
parent | 0a69904ae08e2e7fd41c03a2eada4b5060097377 (diff) |
libkookie: emacs: add notmuch filter rules
Diffstat (limited to '')
3 files changed, 57 insertions, 0 deletions
diff --git a/infra/libkookie/overlays/kookie/emacs/default.nix b/infra/libkookie/overlays/kookie/emacs/default.nix index d89863eaa270..1df6d3886a49 100644 --- a/infra/libkookie/overlays/kookie/emacs/default.nix +++ b/infra/libkookie/overlays/kookie/emacs/default.nix @@ -9,6 +9,7 @@ pkgs.emacsWithPackages (epkgs: ./move-lines ./multi-cursor ./notmuch + ./notmuch-rules ./org ./rust ./theme diff --git a/infra/libkookie/overlays/kookie/emacs/notmuch-rules/default.el b/infra/libkookie/overlays/kookie/emacs/notmuch-rules/default.el new file mode 100644 index 000000000000..a3d6bccf8052 --- /dev/null +++ b/infra/libkookie/overlays/kookie/emacs/notmuch-rules/default.el @@ -0,0 +1,52 @@ +;; kookie-rules.el +;; Configure notmuch searches and settings required to send mail +;; +;; +;; This file is part of LIBKOOKIE, a collection of nix expressions. +;; LIBKOOKIE is licensed under the GPL-3.0 (or later) -- see LICENSE + +(provide 'kookie-rules) +(require 'notmuch) + +(setq mail-host-address "kookie.space") +(setq mml-enable-flowed t) +(setq mml-secure-openpgp-sign-with-sender t) +(setq mml-secure-smime-sign-with-sender t) + +(setq notmuch-address-internal-completion '(received nil)) +(setq notmuch-draft-save-plaintext nil) +(setq notmuch-fcc-dirs "Sent") +(setq notmuch-identities + [ + '("Katharina Sabel <katharina.sabel@mailbox.org>") + '("Katharina Fey <kookie@spacekookie.de") + ]) + +;;; Configure saved searches +;; TODO: make this nicer? +(setq notmuch-saved-searches + '((:name "INBOX" :query "folder:INBOX AND NOT tag:trash" :key "i" :count-query "folder:INBOX AND tag:unread AND NOT tag:trash") + (:name "Sent" :query "folder:Sent OR from:kookie@spacekookie.de OR from:katharina.*@mailbox.org AND NOT tag:trash") + (:name "Kookie" :query "folder:Collection/kookie AND NOT tag:trash" :count-query "folder:Collection/kookie tag:unread") + (:name "Github*" :query "folder:Collection/github" :count-query "folder:Collection/github tag:unread") + (:name "AfRA" :query "folder:Lists/afra" :count-query "folder:Lists/afra tag:unread") + (:name "Hacklab" :query "folder:Lists/hacklab" :count-query "folder:Lists/hacklab tag:unread") + (:name "Misc" :query "folder:Collection/misc AND NOT tag:trash" :count-query "folder:Collection/misc tag:unread") + (:name "qaul-devel" :query "to:~qaul/community@lists.sr.ht AND NOT tag:trash" :count-query "to:~qaul/community@lists.sr.ht tag:unread") + (:name "public-inbox" :query "folder:Lists/public-inbox AND NOT tag:trash" :count-query "folder:Lists/public-inbox AND tag:unread") + (:name "dev-suite" :query "folder:Lists/dev-suite AND NOT tag:trash" :count-query "folder:Lists/dev-suite AND tag:unread") + (:name "rust-cli" :query "folder:Lists/rust/cli-wg AND NOT tag:trash" :count-query "folder:Lists/rust/cli-wg AND tag:unread") + (:name "Shopping" :query "folder:Collection/shopping" :count-query "folder:Collection/shopping AND tag:unread"))) + +;;; Search result format +(setq notmuch-search-result-format + '(("date" . "%16s ") + ("count" . "%-10s ") + ("authors" . "%-24s") + ("subject" . " %s ") + ("tags" . "(%s)"))) + +(setq notmuch-show-empty-saved-searches t) +(setq notmuch-show-logo nil) +(setq notmuch-wash-wrap-lines-length 80) +(setq send-mail-function 'sendmail-send-it) diff --git a/infra/libkookie/overlays/kookie/emacs/notmuch-rules/default.nix b/infra/libkookie/overlays/kookie/emacs/notmuch-rules/default.nix new file mode 100644 index 000000000000..a7eb6cda2729 --- /dev/null +++ b/infra/libkookie/overlays/kookie/emacs/notmuch-rules/default.nix @@ -0,0 +1,4 @@ +{ buildModule, epkgs, pkgs }: + +with epkgs; with pkgs; +(buildModule "notmuch-rules" ./. [ notmuch ]) |