configs/emacs: add mu4e

- all: switch back to just putting emacs on the gui machines
- europa: install mu support things
This commit is contained in:
Aaron Bieber 2024-05-24 11:15:37 -06:00
parent 0bc67c041e
commit a4f20edddb
No known key found for this signature in database
6 changed files with 96 additions and 3 deletions

View File

@ -46,6 +46,7 @@ let
graphviz graphviz
haskellPackages.lsp haskellPackages.lsp
ispell ispell
isync
nil nil
nixpkgs-fmt nixpkgs-fmt
nodePackages.prettier nodePackages.prettier
@ -54,7 +55,6 @@ let
perlPackages.PLS perlPackages.PLS
rubyPackages.solargraph rubyPackages.solargraph
sleek sleek
sumneko-lua-language-server
texlive.combined.scheme-full texlive.combined.scheme-full
tree-sitter tree-sitter
typescript typescript

View File

@ -537,3 +537,92 @@ Custom agenda commands for various things.
(org-agenda-ndays 7) (org-agenda-ndays 7)
(org-agenda-log-mode-items '(state)))))) (org-agenda-log-mode-items '(state))))))
#+end_src #+end_src
* mu4e
~mu~ has been the best mail client for me on emacs.
** Initializing mu
The defaults ~mu~ uses make no sense. ~~/.cache~ is for .. caching data, not
persistent databases.. So we init things with sane defaults:
#+begin_src shell
mu init --muhome=/home/qbit/.mu -m /home/qbit/Maildir/fastmail/ --my-address="aaron@bolddaemon.com"
#+end_src
** General mail configuration
#+begin_src emacs-lisp
(require 'smtpmail)
(setq user-mail-address "aaron@bolddaemon.com"
user-full-name "Aaron Bieber"
message-send-mail-function 'smtpmail-send-it
message-kill-buffer-on-exit t
smtpmail-smtp-user "qbit@fastmail.com"
smtpmail-smtp-server "smtp.fastmail.com"
smtpmail-smtp-service 465
smtpmail-default-smtp-server "smtp.fastmail.com"
smtpmail-stream-type 'ssl)
#+end_src
** mu4e specific configs
#+begin_src emacs-lisp
(use-package mu4e
:init
(require 'mu4e-speedbar)
(setq mail-user-agent 'mu4e-user-agent
read-mail-command 'mu4e
mu4e-get-mail-command "mbsync fastmail"
mu4e-update-interval 420
mu4e-compose-context-policy nil
mu4e-context-policy 'pick-first
mu4e-drafts-folder "/Drafts"
mu4e-sent-folder "/Sent Items"
mu4e-trash-folder "/Trash"
mu4e-maildir-shortcuts
'( ("/INBOX" . ?i)
("/Archive" . ?a)
("/Sent Items" . ?s))
org-mu4e-link-query-in-headers-mode nil
mu4e-attachment-dir
(lambda (fname mtype)
(cond
((and fname (string-match "\\.diff$" fname)) "~/patches")
((and fname (string-match "\\.patch$" fname)) "~/patches")
((and fname (string-match "\\.diff.gz$" fname)) "~/patches")
(t "~/Downloads")))
mu4e-bookmarks
`(( :name "Inbox"
:query "maildir:/Inbox AND NOT flag:trashed"
:key ?i)
( :name "TODO"
:query "maildir:/TODO AND NOT flag:trashed"
:key ?T)
( :name "Unread messages"
:query "flag:unread AND NOT flag:trashed AND NOT list:ports-changes.openbsd.org AND NOT list:source-changes.openbsd.org"
:key ?u)
( :name "Today's messages"
:query "date:today..now"
:key ?d)
( :name "Hackers"
:query "list:hackers.openbsd.org AND NOT flag:trashed"
:key ?h)
( :name "Bugs"
:query "list:bugs.openbsd.org AND NOT flag:trashed"
:key ?b)
( :name "Tech"
:query "list:tech.openbsd.org AND NOT flag:trashed"
:key ?t)
( :name "Ports"
:query "list:ports.openbsd.org AND NOT flag:trashed"
:key ?p)
( :name "Misc"
:query "list:misc.openbsd.org AND NOT flag:trashed"
:key ?m)
( :name "9front"
:query "list:9front.9front.org AND NOT flag:trashed"
:key ?9)
( :name "GOT"
:query "list:gameoftrees.openbsd.org AND NOT flag:trashed"
:key ?g))))
#+end_src

View File

@ -20,7 +20,6 @@ let
inherit config; inherit config;
inherit xinlib; inherit xinlib;
}; };
myEmacs = pkgs.callPackage ./configs/emacs.nix { inherit isUnstable; };
in in
{ {
imports = [ imports = [
@ -181,7 +180,6 @@ in
lz4 lz4
minisign minisign
mosh mosh
myEmacs
nix-diff nix-diff
nix-index nix-index
nix-output-monitor nix-output-monitor

View File

@ -12,6 +12,7 @@ let
inherit (inputs.beyt.packages.${pkgs.system}) beyt; inherit (inputs.beyt.packages.${pkgs.system}) beyt;
firefox = import ../configs/firefox.nix { inherit pkgs; }; firefox = import ../configs/firefox.nix { inherit pkgs; };
rage = pkgs.writeScriptBin "rage" (import ../bins/rage.nix { inherit pkgs; }); rage = pkgs.writeScriptBin "rage" (import ../bins/rage.nix { inherit pkgs; });
myEmacs = pkgs.callPackage ./configs/emacs.nix { inherit isUnstable; };
rpr = rpr =
pkgs.writeScriptBin "rpr" pkgs.writeScriptBin "rpr"
(import ../bins/rpr.nix { inherit (pkgs) hut gh tea; }); (import ../bins/rpr.nix { inherit (pkgs) hut gh tea; });
@ -100,6 +101,7 @@ with lib; {
vlc vlc
zeal zeal
myEmacs
(callPackage ../configs/helix.nix { }) (callPackage ../configs/helix.nix { })
]); ]);
}; };

View File

@ -349,11 +349,13 @@ in
gqrx gqrx
hackrf hackrf
inkscape inkscape
isync
jan jan
jujutsu jujutsu
klavaro klavaro
koreader koreader
minicom minicom
mu
nheko nheko
nix-index nix-index
nixpkgs-review nixpkgs-review

View File

@ -679,6 +679,8 @@ in
proxy_set_header Host $host:$server_port; proxy_set_header Host $host:$server_port;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Ssl on; proxy_set_header X-Forwarded-Ssl on;
proxy_set_header Authorization $http_authorization;
proxy_pass_header Authorization;
proxy_read_timeout 300; proxy_read_timeout 300;
proxy_connect_timeout 300; proxy_connect_timeout 300;
proxy_pass http://127.0.0.1:8044; proxy_pass http://127.0.0.1:8044;