diff options
-rw-r--r-- | gui/conf/init.el | 39 | ||||
-rw-r--r-- | gui/default.nix | 2 | ||||
-rw-r--r-- | gui/emacs.nix | 1 | ||||
-rw-r--r-- | gui/email.nix | 71 |
4 files changed, 113 insertions, 0 deletions
diff --git a/gui/conf/init.el b/gui/conf/init.el index 206d228..7af778e 100644 --- a/gui/conf/init.el +++ b/gui/conf/init.el @@ -73,6 +73,9 @@ (global-evil-leader-mode 1) (evil-leader/set-leader ",")) +(use-package evil-collection + :ensure t) + (use-package minions :ensure t :config @@ -345,3 +348,39 @@ (lambda () (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 "mbsync -a") + (setq mu4e-use-fancy-chars t) + (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) + (evil-collection-init 'mu4e)) + +(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")))))) diff --git a/gui/default.nix b/gui/default.nix index 2cbd113..eaad32a 100644 --- a/gui/default.nix +++ b/gui/default.nix @@ -9,8 +9,10 @@ in { ./kitty.nix ./vim.nix ./emacs.nix + ./email.nix ./zathura.nix ./pass.nix + # applications grouped by purpose ./apps/file.nix ./apps/web.nix diff --git a/gui/emacs.nix b/gui/emacs.nix index f9c2aa4..c674213 100644 --- a/gui/emacs.nix +++ b/gui/emacs.nix @@ -48,6 +48,7 @@ ] ++ [ akr-color-theme custom-runtime-env + pkgs.mu ]; }; diff --git a/gui/email.nix b/gui/email.nix new file mode 100644 index 0000000..675233d --- /dev/null +++ b/gui/email.nix @@ -0,0 +1,71 @@ +{ pkgs, ... }: + +{ + programs.mbsync.enable = true; + programs.msmtp.enable = true; + + accounts.email = { + maildirBasePath = "mail"; + + accounts.automatix = { + primary = true; + + realName = "Adrian Kummerländer"; + address = "adrian@kummerlaender.eu"; + + userName = "adrian@kummerlaender.eu"; + passwordCommand = "pass it/automatix_mail"; + + gpg = { + key = "61F4C67D12636E70AFB10C3D83E758150AB49859"; + }; + + imap = { + host = "mx.kummerlaender.eu"; + tls.enable = true; + }; + + mbsync = { + enable = true; + create = "maildir"; + }; + + smtp = { + host = "mx.kummerlaender.eu"; + port = 587; + tls.useStartTls = true; + }; + + msmtp.enable = true; + }; + + accounts.kit = { + realName = "Adrian Kummerländer"; + address = "adrian.kummerlaender@student.kit.edu"; + + userName = "urdzx@student.kit.edu"; + passwordCommand = "pass kit"; + + imap = { + host = "imap.kit.edu"; + tls.enable = true; + }; + + mbsync = { + enable = true; + create = "maildir"; + extraConfig.account = { + AuthMechs = "PLAIN"; + }; + }; + + smtp = { + host = "smtp.kit.edu"; + port = 587; + tls.useStartTls = true; + }; + + msmtp.enable = true; + }; + }; +} |