home

My NixOS systems configurations.
Log | Files | Refs | LICENSE

init.el (8030B)


      1 
      2 ;; GnusCfg
      3 (use-package gnus
      4   :config
      5   (setq nnml-directory "~/desktop/gnus/mail")
      6   (setq nnfolder-directory "~/desktop/gnus/archive")
      7   (setq nndraft-directory "~/desktop/gnus/drafts")
      8   (setq nnmh-directory "~/desktop/gnus/drafts")
      9   (setq gnus-article-save-directory "~/desktop/gnus/news")
     10   (setq gnus-home-directory "~/desktop/gnus")
     11   (setq gnus-kill-files-directory "~/desktop/gnus/news")
     12   (setq gnus-cache-directory "~/desktop/gnus/news/cache")
     13   (setq gnus-startup-file "~/desktop/gnus/newsrc")
     14   (setq mail-source-directory "~/desktop/gnus/mail")
     15   (setq gnus-registry-cache-file "~/desktop/gnus/gnus.registry.eld")
     16   (setq gnus-select-method '(nnnil))
     17   (setq nntp-authinfo-file "~/.authinfo.gpg")
     18   (setq gnus-use-bbdb t)
     19   (setq gnus-secondary-select-methods
     20         '((nntp "news.gwene.org")
     21           (nnimap "prv"
     22                   (nnimap-address "mail.gandi.net")
     23                   (nnimap-stream ssl)
     24                   (nnimap-authinfo-file "~/.authinfo.gpg"))
     25           (nnimap "redhat"
     26                   (nnimap-address "imap.gmail.com")
     27                   (nnimap-stream ssl)
     28                   (nnimap-authinfo-file "~/.authinfo.gpg"))
     29           (nnimap "vde"
     30                   (nnimap-address "imap.gmail.com")
     31                   (nnimap-stream ssl)
     32                   (nnimap-authinfo-file "~/.authinfo.gpg"))
     33           ))
     34   (setq gnus-parameters
     35         '(("prv"
     36            (posting-style
     37             (address "vincent@demeester.fr")
     38             (signature-file "~/desktop/documents/.prv.signature")
     39             (gcc "nnimap+prv:Sent")))
     40           ("redhat"
     41            (posting-style
     42             (address "vdemeest@redhat.com")
     43             (signature-file "~/desktop/documents/.redhat.signature")))
     44           ("nnimap+redhat:INBOX"
     45            (display . all))
     46           ("vde"
     47            (posting-style
     48             (address "vinc.demeester.fr")
     49             (signature-file "~/desktop/documents/.vde.signature")))
     50           ("nnimap+vde:INBOX"
     51            (display . all))))
     52   (setq gnus-agent t)
     53   (setq mail-user-agent 'gnus-user-agent) ; also works with `sendmail-user-agent'
     54   (setq gnus-check-new-newsgroups 'ask-server)
     55   (setq gnus-read-active-file 'some)
     56   (setq gnus-use-dribble-file t)
     57   (setq gnus-always-read-dribble-file t)
     58   (setq gnus-novice-user nil)
     59   (setq gnus-extra-headers
     60         '(To Newsgroups X-GM-LABELS)))
     61 ;; -GnusCfg
     62 
     63 ;; GnusMmlSec
     64 (use-package mml-sec
     65   :config
     66   (setq mml-secure-openpgp-signers
     67         '("8C4E8DDA04C18C6B503BD2DBB7E7CF1C634256FA")))
     68 ;; -GnusMmlSec
     69 
     70 ;; GnusAgent
     71 (use-package gnus-agent
     72   :after gnus
     73   :config
     74   (setq gnus-agent-article-alist-save-format 1)  ; uncompressed
     75   (setq gnus-agent-cache t)
     76   (setq gnus-agent-confirmation-function 'y-or-n-p)
     77   (setq gnus-agent-consider-all-articles nil)
     78   (setq gnus-agent-directory "~/desktop/gnus/agent/")
     79   (setq gnus-agent-enable-expiration 'ENABLE)
     80   (setq gnus-agent-expire-all nil)
     81   (setq gnus-agent-expire-days 30)
     82   (setq gnus-agent-mark-unread-after-downloaded t)
     83   (setq gnus-agent-queue-mail t)        ; queue if unplugged
     84   (setq gnus-agent-synchronize-flags nil))
     85 ;; -GnusAgent
     86 
     87 ;; GnusAsync
     88 (use-package gnus-async
     89   :after gnus
     90   :config
     91   (setq gnus-asynchronous t)
     92   (setq gnus-use-article-prefetch 30))
     93 ;; -GnusAsync
     94 
     95 ;; GnusGroup
     96 (use-package gnus-group
     97   :after gnus
     98   :config
     99   (setq gnus-level-subscribed 6)
    100   (setq gnus-level-unsubscribed 7)
    101   (setq gnus-level-zombie 8)
    102   (setq gnus-group-sort-function
    103         '((gnus-group-sort-by-unread)
    104           (gnus-group-sort-by-alphabet)
    105           (gnus-group-sort-by-rank)))
    106   (setq gnus-group-mode-line-format "Gnus: %%b")
    107   :hook
    108   (gnus-select-group-hook . gnus-group-set-timestamp)
    109   :bind (:map gnus-agent-group-mode-map
    110               ("M-n" . gnus-topic-goto-next-topic)
    111               ("M-p" . gnus-topic-goto-previous-topic)))
    112 ;; -GnusGroup
    113 
    114 ;; GnusTopic
    115 (use-package gnus-topic
    116   :after (gnus gnus-group)
    117   :config
    118   (setq gnus-topic-display-empty-topics t)
    119   :hook
    120   (gnus-group-mode . gnus-topic-mode))
    121 ;; -GnusTopic
    122 
    123 ;; GnusSummary
    124 (use-package gnus-sum
    125   :after (gnus gnus-group)
    126   :demand
    127   :config
    128   (setq gnus-auto-select-first nil)
    129   (setq gnus-summary-ignore-duplicates t)
    130   (setq gnus-suppress-duplicates t)
    131   (setq gnus-summary-goto-unread nil)
    132   (setq gnus-summary-make-false-root 'adopt)
    133   (setq gnus-summary-thread-gathering-function 'gnus-gather-threads-by-subject)
    134   (setq gnus-thread-sort-functions
    135         '((not gnus-thread-sort-by-number)
    136           (not gnus-thread-sort-by-date)))
    137   (setq gnus-subthread-sort-functions
    138         'gnus-thread-sort-by-date)
    139   (setq gnus-thread-hide-subtree nil)
    140   (setq gnus-thread-ignore-subject t)
    141   (setq gnus-user-date-format-alist
    142         '(((gnus-seconds-today) . "Today at %R")
    143           ((+ 86400 (gnus-seconds-today)) . "Yesterday, %R")
    144           (t . "%Y-%m-%d %R")))
    145   (setq gnus-summary-line-format "%U%R%z %-16,16&user-date;  %4L:%-30,30f  %B%S\n")
    146   (setq gnus-summary-mode-line-format "Gnus: %p (%U)")
    147   (setq gnus-sum-thread-tree-false-root "─┬➤")
    148   (setq gnus-sum-thread-tree-indent "  ")
    149   (setq gnus-sum-thread-tree-single-indent "")
    150   (setq gnus-sum-thread-tree-leaf-with-other "├─➤")
    151   (setq gnus-sum-thread-tree-root "· ")
    152   (setq gnus-sum-thread-tree-single-leaf "└─➤")
    153 
    154   (setq gnus-sum-thread-tree-vertical "│")
    155   :hook
    156   (gnus-summary-exit-hook . gnus-topic-sort-groups-by-alphabet)
    157   (gnus-summary-exit-hook . gnus-group-sort-groups-by-rank)
    158   :bind (:map gnus-agent-summary-mode-map
    159               ("<delete>" . gnus-summary-delete-article)
    160               ("n" . gnus-summary-next-article)
    161               ("p" . gnus-summary-prev-article)
    162               ("N" . gnus-summary-next-unread-article)
    163               ("P" . gnus-summary-prev-unread-article)
    164               ("M-n" . gnus-summary-next-thread)
    165               ("M-p" . gnus-summary-prev-thread)
    166               ("C-M-n" . gnus-summary-next-group)
    167               ("C-M-p" . gnus-summary-prev-group)
    168               ("C-M-^" . gnus-summary-refer-thread)))
    169 ;; -GnusSummary
    170 
    171 ;; GnusWin
    172 ;; (use-package gnus-win
    173 ;;   :config
    174 ;;   (gnus-add-configuration
    175 ;;    '(article
    176 ;;      (horizontal 1.0
    177 ;;                  (vertical 40 (group 1.0))
    178 ;;                  (vertical 1.0
    179 ;;                            (summary 0.16 point)
    180 ;;                            (article 1.0)))))
    181 ;;
    182 ;;   (gnus-add-configuration
    183 ;;    '(summary
    184 ;;      (horizontal 1.0
    185 ;;                  (vertical 40 (group 1.0))
    186 ;;                  (vertical 1.0 (summary 1.0 point))))))
    187 ;; -GnusWin
    188 
    189 ;; GnusDired
    190 (use-package gnus-dired
    191   :after (gnus dired)
    192   :hook (dired-mode . gnus-dired-mode))
    193 ;; -GnusDired
    194 
    195 ;; GnusDemon
    196 (use-package gnus-demon
    197   :after (gnus)
    198   :config
    199   ;; Get mail every 30min
    200   (gnus-demon-add-handler 'gnus-group-get-new-news 30 t)
    201   (gnus-demon-init))
    202 ;; -GnusDemon
    203 
    204 ;; UseBBDB
    205 (use-package bbdb
    206   :config
    207   (setq-default bbdb-file "~/desktop/gnus/bbdb")
    208   (bbdb-initialize 'message 'gnus 'com 'anniv)
    209   (bbdb-mua-auto-update-init 'message 'gnus 'com 'anniv)
    210 
    211   (setq-default bbdb-offer-save 1                   ;; 1 means save-without-asking
    212                 bbdb-always-add-addresses t
    213                 bbdb-update-records-p 'create       ;; Auto-create
    214                 bbdb-snarf-rule-default 'mail       ;; Just snarf with mail by default
    215                 bbdb-mail-avoid-redundancy nil      ;; always use full name
    216                 bbdb-add-name 2                     ;; show name-mismatches for 2 secs
    217                 bbdb-add-mails t                    ;; add new addresses to existing...
    218                 bbdb-canonicalize-redundant-mails t ;; x@foo.bar.cx => x@bar.cx
    219                 bbdb-completion-list t              ;; complete on anything
    220                 bbdb-complete-mail-allow-cycling t  ;; cycle trough matches
    221                 bbdb-phone-style nil                ;; No north american
    222                 bbdb-mua-pop-up nil
    223                 bbdb-mua-pop-up-window-size 2
    224                 bbdb-mua-update-interactive-p '(query . query)
    225                 bbdb-pop-up-layout 'one-line))
    226 ;; -UseBBDB