about summary refs log tree commit diff
path: root/modules/common/emacs
diff options
context:
space:
mode:
Diffstat (limited to 'modules/common/emacs')
-rw-r--r--modules/common/emacs/default.nix16
-rw-r--r--modules/common/emacs/doom/config.el60
2 files changed, 35 insertions, 41 deletions
diff --git a/modules/common/emacs/default.nix b/modules/common/emacs/default.nix
index c89fba5..3be560e 100644
--- a/modules/common/emacs/default.nix
+++ b/modules/common/emacs/default.nix
@@ -159,14 +159,14 @@ in {
                     personalAddresses = concatMapStringsSep " " (v: ''"${v}"'') aliases;
                   in ''
                     (set-email-account! "${name}"
-                      '((user-full-name        . "${realName}")
-                        (user-mail-address     . "${address}")
-                        (mu4e-inbox-folder     . "/${name}/${folders.inbox}")
-                        (mu4e-sent-folder      . "/${name}/${folders.sent}")
-                        (mu4e-drafts-folder    . "/${name}/${folders.drafts}")
-                        (mu4e-trash-folder     . "/${name}/${folders.trash}")
-                        (mu4e-refile-folder    . "/${name}/Archive")
-                        (+mu4e-personal-addresses (list ${personalAddresses})))
+                      '((user-full-name           . "${realName}")
+                        (user-mail-address        . "${address}")
+                        (mu4e-inbox-folder        . "/${name}/${folders.inbox}")
+                        (mu4e-sent-folder         . "/${name}/${folders.sent}")
+                        (mu4e-drafts-folder       . "/${name}/${folders.drafts}")
+                        (mu4e-trash-folder        . "/${name}/${folders.trash}")
+                        (mu4e-refile-folder       . "/${name}/Archive")
+                        (+mu4e-personal-addresses . (${personalAddresses})))
                       t)
                   '')
                 muAccounts;
diff --git a/modules/common/emacs/doom/config.el b/modules/common/emacs/doom/config.el
index 4863792..589b993 100644
--- a/modules/common/emacs/doom/config.el
+++ b/modules/common/emacs/doom/config.el
@@ -32,29 +32,27 @@
 ;;; Org
 ;;
 
-(setq org-directory "~/doc/org/")
-(after! org
-  (setq org-todo-keywords '((sequence
-                             "PROJ(p)" ; A master task.
-                             "TODO(t)" ; A task that needs to be done with statues:
-                             "STRT(s@)" ; - In progress.
-                             "HOLD(l@/!)" ; - Paused because of me.
-                             "WAIT(w@/!)" ; - Paused because of not me.
-                             "|"
-                             "DONE(d@/!)" ; Complete state.
-                             "KILL(k@/!)")) ; Incomplete state.
-        org-todo-keyword-faces '(("PROJ" . +org-todo-project)
-                                 ("TODO" . +org-todo-active)
-                                 ("STRT" . +org-todo-active)
-                                 ("HOLD" . +org-todo-onhold)
-                                 ("WAIT" . +org-todo-onhold)
-                                 ("DONE" . +org-todo-cancel)
-                                 ("KILL" . +org-todo-cancel))))
+(setq org-directory "~/doc/org/"
+      org-todo-keywords '((sequence
+                           "PROJ(p)" ; A master task.
+                           "TODO(t)" ; A task that needs to be done with statues:
+                           "STRT(s@)" ; - In progress.
+                           "HOLD(l@/!)" ; - Paused because of me.
+                           "WAIT(w@/!)" ; - Paused because of not me.
+                           "|"
+                           "DONE(d@/!)" ; Complete state.
+                           "KILL(k@/!)")) ; Incomplete state.
+      org-todo-keyword-faces '(("PROJ" . +org-todo-project)
+                               ("TODO" . +org-todo-active)
+                               ("STRT" . +org-todo-active)
+                               ("HOLD" . +org-todo-onhold)
+                               ("WAIT" . +org-todo-onhold)
+                               ("DONE" . +org-todo-cancel)
+                               ("KILL" . +org-todo-cancel)))
 
 (add-hook! 'org-mode-hook 'auto-fill-mode)
 
-(add-hook! 'org-mode-hook (lambda (&rest _)
-                            (setq fill-column 80)))
+(setq-hook! 'org-mode-hook fill-column 80)
 
 (setq org-roam-directory "~/doc/roam/"
       org-roam-db-location (concat org-roam-directory ".db"))
@@ -72,7 +70,7 @@
 ;;; Elisp
 ;;
 
-(setq-default flycheck-disabled-checkers '(emacs-lisp-checkdoc))
+(pushnew! flycheck-disabled-checkers 'emacs-lisp-checkdoc)
 
 ;;
 ;;; Haskell
@@ -96,7 +94,7 @@
 ;;
 
 (add-hook! 'yaml-mode-hook
-  (defun +disable-flycheck-for-yaml-helm-templates ()
+  (defun nixfiles/disable-flycheck-for-helm-templates-h ()
     (when (and buffer-file-name
                (string-match-p "/templates/" buffer-file-name)
                (or (string-suffix-p ".yaml" buffer-file-name)
@@ -121,17 +119,13 @@
 ;;; mu4e
 ;;
 
-(setq mu4e-root-maildir "~/mail"
-      mu4e-context-policy 'ask-if-none
-      mu4e-compose-context-policy 'always-ask
-      mu4e-update-interval 60
-      sendmail-program (executable-find "msmtp")
-      send-mail-function #'message-send-mail-with-sendmail
-      message-send-mail-function #'message-send-mail-with-sendmail
-      message-sendmail-envelope-from 'header
-      message-sendmail-extra-arguments '("--read-envelope-from")
-      message-sendmail-f-is-evil t
-      message-kill-buffer-on-exit t)
+(setq-hook! 'mu4e-main-mode-hook mu4e-update-interval 60)
+
+(setq-hook! 'mu4e-compose-mode-hook sendmail-program (executable-find "msmtp")
+                                    send-mail-function #'sendmail-send-it
+                                    message-send-mail-function #'message-send-mail-with-sendmail
+                                    message-sendmail-extra-arguments '("--read-envelope-from")
+                                    message-sendmail-f-is-evil t)
 
 ;;
 ;;; Circe

Consider giving Nix/NixOS a try! <3