diff options
author | Adrian Kummerlaender | 2020-06-25 22:38:11 +0200 |
---|---|---|
committer | Adrian Kummerlaender | 2020-06-25 22:38:11 +0200 |
commit | 63cf5d70364ce0bb0e74dcab4cd8e5f33a9048bc (patch) | |
tree | 1f5fb1ddcd1edba2bb039ab208522ccf88c6cc44 /gui | |
parent | d65608a61cee79903b540351f24d7e63bf7f40d0 (diff) | |
download | nixos_home-63cf5d70364ce0bb0e74dcab4cd8e5f33a9048bc.tar nixos_home-63cf5d70364ce0bb0e74dcab4cd8e5f33a9048bc.tar.gz nixos_home-63cf5d70364ce0bb0e74dcab4cd8e5f33a9048bc.tar.bz2 nixos_home-63cf5d70364ce0bb0e74dcab4cd8e5f33a9048bc.tar.lz nixos_home-63cf5d70364ce0bb0e74dcab4cd8e5f33a9048bc.tar.xz nixos_home-63cf5d70364ce0bb0e74dcab4cd8e5f33a9048bc.tar.zst nixos_home-63cf5d70364ce0bb0e74dcab4cd8e5f33a9048bc.zip |
Move Emacs mail config into separate file
Diffstat (limited to 'gui')
-rw-r--r-- | gui/conf/init.el | 48 | ||||
-rw-r--r-- | gui/email.nix | 2 |
2 files changed, 5 insertions, 45 deletions
diff --git a/gui/conf/init.el b/gui/conf/init.el index fb49dc7..59158f6 100644 --- a/gui/conf/init.el +++ b/gui/conf/init.el @@ -361,48 +361,6 @@ (define-key eshell-mode-map (kbd "<tab>") (lambda () (interactive) (completion-at-point))))) -(use-package mu4e - :config - (setq mu4e-maildir "~/mail") - (setq mu4e-get-mail-command "true") - (setq mu4e-update-interval 120) - (setq mu4e-use-fancy-chars t) - (setq mu4e-headers-attach-mark '("a" . "@")) ; alignment fix - (setq mu4e-change-filenames-when-moving t) - (setq sendmail-program "msmtp" - send-mail-function 'smtpmail-send-it - message-sendmail-f-is-evil t - message-send-mail-function 'message-send-mail-with-sendmail) - (require 'org-mu4e) - (evil-collection-init 'mu4e) - (setq doom-modeline-mu4e t)) - -(use-package mu4e-alert - :ensure t - :config - (mu4e-alert-set-default-style 'libnotify) - (add-hook 'after-init-hook #'mu4e-alert-enable-notifications)) - -(setq mu4e-contexts - `(,(make-mu4e-context - :name "private" - :match-func (lambda (msg) - (when msg - (string-match-p "^/automatix" (mu4e-message-field msg :maildir)))) - :vars '((user-mail-address . "adrian@kummerlaender.eu") - (user-full-name . "Adrian Kummerländer") - (mu4e-sent-folder . "/automatix/Sent") - (mu4e-drafts-folder . "/automatix/Drafts") - (mu4e-trash-folder . "/automatix/Trash") - (message-sendmail-extra-arguments . ("--read-envelope-from" "--account=automatix")))) - ,(make-mu4e-context - :name "KIT" - :match-func (lambda (msg) - (when msg - (string-match-p "^/kit" (mu4e-message-field msg :maildir)))) - :vars '((user-mail-address . "adrian.kummerlaender@student.kit.edu") - (user-full-name . "Adrian Kummerländer") - (mu4e-sent-folder . "/kit/Sent") - (mu4e-drafts-folder . "/kit/Drafts") - (mu4e-trash-folder . "/kit/Trash") - (message-sendmail-extra-arguments . ("--read-envelope-from" "--account=kit")))))) +(let ((mu4e-config "~/.emacs.d/email.el")) + (when (file-exists-p mu4e-config) + (load-file mu4e-config))) diff --git a/gui/email.nix b/gui/email.nix index ee5c2c5..b8bc733 100644 --- a/gui/email.nix +++ b/gui/email.nix @@ -74,4 +74,6 @@ services.mbsync = { enable = true; }; + + home.file.".emacs.d/email.el".source = ./conf/email.el; } |