]> Git — Sourcephile - julm/julm-nix.git/blob - homes/julm/mutt.nix
mmsd: push in nixpkgs#196965
[julm/julm-nix.git] / homes / julm / mutt.nix
1 { pkgs, lib, config, ... }:
2 {
3 xdg.configFile."mutt/mailcap".text = ''
4 application/pdf; evince %s; test=test -n "$DISPLAY";
5 image/vnd.djvu; djview4 %s; test=test -n "$DISPLAY";
6 image/*; geeqie %s; test=test -n "$DISPLAY";
7 text/html; firefox %s; test=test -n "$DISPLAY"; edit=firefox %s;
8 '';
9 xdg.configFile."neomutt/neomuttrc".text = ''
10 unmailboxes *
11 set header_cache = "${config.xdg.cacheHome}/mutt/headers"
12 set mailcap_path = "${config.xdg.configHome}/mutt/mailcap"
13 set message_cachedir = "${config.xdg.cacheHome}/mutt/messages"
14 set news_cache_dir = '${config.xdg.cacheHome}/mutt/news'
15 set tmpdir = "${config.xdg.cacheHome}/mutt/tmp"
16 set newsrc = '${config.xdg.configHome}/mutt/newsrc.%s'
17 ${builtins.readFile mutt/muttrc}
18 macro index,pager H ":set auto_tag=yes\n:unset wait_key\n<pipe-entry>${pkgs.procmail}/bin/formail -ds | rspamc learn_ham\n:set wait_key\n" "Flag as HAM"
19 macro index,pager S "<pipe-entry>${pkgs.procmail}/bin/formail -ds | rspamc symbols\n<enter-command>set wait_key\n" "Tests if it is SPAM"
20 macro index,pager s ":set confirmappend=no delete=yes auto_tag=yes\n:unset wait_key\n<pipe-entry>${pkgs.procmail}/bin/formail -ds | rspamc learn_spam\n:set wait_key\n<save-message>=.Pourriel/\n<sync-mailbox>:set confirmappend=yes delete=ask-yes\n" "Flag as SPAM"
21
22 account-hook (autogeree.net) 'set certificate_file = ${mutt/autogeree.net/certificate_file.pem}'
23 account-hook (sourcephile.fr) 'set certificate_file = ${mutt/sourcephile.fr/certificate_file.pem}'
24
25 #source ${mutt/sourcephile.fr/julm.imap.conf}
26 #source ${mutt/autogeree.net/julm.imap.conf}
27 #set nm_default_uri = imaps://julm@sourcephile.fr@mail.sourcephile.fr:993/INBOX
28 #set spoolfile = imaps://julm@sourcephile.fr@mail.sourcephile.fr:993/
29
30 folder-hook (/autogeree.net/) 'source ${mutt/autogeree.net/julm.maildir.conf}'
31 source ${mutt/autogeree.net/julm.maildir.conf}
32 mailboxes `find -P ~/mail/autogeree.net/mail/ -type d -name new -printf "\"%h\" "`
33
34 folder-hook (/sourcephile.fr/) 'source ${mutt/sourcephile.fr/julm.maildir.conf}'
35 source ${mutt/sourcephile.fr/julm.maildir.conf}
36 mailboxes `find -P ~/mail/sourcephile.fr/mail/ -type d -name new -printf "\"%h\" "`
37
38 folder-hook (news.sourcephile.fr) 'source ${mutt/sourcephile.fr/julm.maildir.conf}; set record = =Envoyés'
39 source ${mutt/sourcephile.fr/mails.nntp.conf}
40 source ${mutt/sourcephile.fr/mails.imap.conf}
41
42 '';
43 }