about summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--modules/common/curl.nix1
-rw-r--r--modules/common/emacs/doom/config.el144
-rw-r--r--modules/common/emacs/doom/init.el3
-rw-r--r--modules/nixos/syncthing.nix6
4 files changed, 104 insertions, 50 deletions
diff --git a/modules/common/curl.nix b/modules/common/curl.nix
index 7c51bbd..4149f80 100644
--- a/modules/common/curl.nix
+++ b/modules/common/curl.nix
@@ -13,7 +13,6 @@ in {
     hm.home.file.".curlrc".text = ''
       connect-timeout = 60
       progress-bar
-      referer = ";auto"
       remote-time
       show-error
     '';
diff --git a/modules/common/emacs/doom/config.el b/modules/common/emacs/doom/config.el
index 6095c40..493a79a 100644
--- a/modules/common/emacs/doom/config.el
+++ b/modules/common/emacs/doom/config.el
@@ -33,23 +33,60 @@
 ;;; Org
 ;;
 
-(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)))
+(after! org
+  (setq org-directory "~/doc/org/"
+        org-todo-keywords '((sequence
+                             "TODO(t)"
+                             "LOOP(r)"
+                             "STRT(s@)"
+                             "WAIT(w@/!)"
+                             "HOLD(h@/!)"
+                             "IDEA(i)"
+                             "PROJ(p)"
+                             "|"
+                             "DONE(d@/!)"
+                             "KILL(k@/!)"))
+        org-todo-keyword-faces '(("STRT" . +org-todo-active)
+                                 ("WAIT" . +org-todo-onhold)
+                                 ("HOLD" . +org-todo-onhold)
+                                 ("PROJ" . +org-todo-project)
+                                 ("NO"   . +org-todo-cancel)
+                                 ("KILL" . +org-todo-cancel))
+        org-capture-templates '(("t" "Personal todo" entry
+                                 (file+headline +org-capture-todo-file "Inbox")
+                                 "* TODO %?\n%i\n%a" :prepend t)
+                                ("n" "Personal notes" entry
+                                 (file+headline +org-capture-notes-file "Inbox")
+                                 "* %u %?\n%i\n%a" :prepend t)
+                                ("j" "Journal" entry
+                                 (file+olp+datetree +org-capture-journal-file)
+                                 "* %U %?\n%i\n%a" :prepend t)
+                                ("p" "Templates for projects")
+                                ("pt" "Project-local todo" entry  ; {project-root}/todo.org
+                                 (file+headline +org-capture-project-todo-file "Inbox")
+                                 "* TODO %?\n%i\n%a" :prepend t)
+                                ("pn" "Project-local notes" entry  ; {project-root}/notes.org
+                                 (file+headline +org-capture-project-notes-file "Inbox")
+                                 "* %U %?\n%i\n%a" :prepend t)
+                                ("pc" "Project-local changelog" entry  ; {project-root}/changelog.org
+                                 (file+headline +org-capture-project-changelog-file "Unreleased")
+                                 "* %U %?\n%i\n%a" :prepend t)
+                                ("o" "Centralized templates for projects")
+                                ("ot" "Project todo" entry
+                                 (function +org-capture-central-project-todo-file)
+                                 "* TODO %?\n %i\n %a"
+                                 :heading "Tasks"
+                                 :prepend nil)
+                                ("on" "Project notes" entry
+                                 (function +org-capture-central-project-notes-file)
+                                 "* %U %?\n %i\n %a"
+                                 :heading "Notes"
+                                 :prepend t)
+                                ("oc" "Project changelog" entry
+                                 (function +org-capture-central-project-changelog-file)
+                                 "* %U %?\n %i\n %a"
+                                 :heading "Changelog"
+                                 :prepend t))))
 
 (add-hook! 'org-mode-hook 'auto-fill-mode)
 
@@ -74,6 +111,10 @@
 (after! flycheck
   (pushnew! flycheck-disabled-checkers 'emacs-lisp-checkdoc))
 
+;; Turn this off because it leaves face artifacts when changing indentation.
+(add-hook! 'emacs-lisp-mode-hook
+  (highlight-indent-guides-mode -1))
+
 ;;
 ;;; Haskell
 ;;
@@ -84,6 +125,9 @@
 ;;; YAML
 ;;
 
+;; There's no optimal solution to properly deal with Go templates inside YAML. I
+;; have to turn this off to save myself the headache of dealing with syntax
+;; errors up my ass.
 (add-hook! 'yaml-mode-hook
   (defun nixfiles/disable-flycheck-for-helm-templates-h ()
     (when (and buffer-file-name
@@ -110,13 +154,13 @@
 ;;; mu4e
 ;;
 
-(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)
+(setq-hook! 'mu4e-main-mode-hook
+  mu4e-update-interval 30
+  message-send-mail-function #'message-send-mail-with-sendmail
+  message-sendmail-extra-arguments '("--read-envelope-from")
+  message-sendmail-f-is-evil t
+  send-mail-function #'sendmail-send-it
+  sendmail-program (executable-find "msmtp"))
 
 ;;
 ;;; Circe
@@ -149,27 +193,37 @@
     :user "azahi/rizon"
     :pass nixfiles/irc-bouncer-password-f))
 
-;; (use-package! hledger-mode
-;;   :mode ("\\.journal\\'")
-;;   :hook ((hledger-view-mode . hl-line-mode)
-;;          (hledger-view-mode . center-text-for-reading))
-;;   :init
-;;   (setq hledger-jfile "~/doc/accounting/current.journal")
-;;   :config
-;;   (set-company-backend! 'hledger-mode 'hledger-company)
-;;   (add-hook! 'hledger-mode-hook
-;;     (lambda (&rest _)
-;;       (make-local-variable 'company-backends)
-;;       (add-to-list 'company-backends 'hledger-company))))
-
-;; (use-package! hledger-input
-;;   :hook ((hledger-input-post-commit . hledger-show-new-balances)
-;;          (hledger-input-mode . auto-fill-mode)
-;;          (hledger-input-mode . (lambda (&rest _)
-;;                                  (make-local-variable 'compay-idle-delay)
-;;                                  (setq-local company-idle-delay 0.1))))
-;;   :init
-;;   (setq hledger-input-buffer-height 20))
+;;
+;;; Hledger
+;;
+
+(use-package! hledger-mode
+  :disabled
+  :mode ("\\.journal\\'")
+  :hook ((hledger-view-mode . hl-line-mode)
+         (hledger-view-mode . center-text-for-reading))
+  :init
+  (setq hledger-jfile "~/doc/accounting/current.journal")
+  :config
+  (set-company-backend! 'hledger-mode 'hledger-company)
+  (add-hook! 'hledger-mode-hook
+    (lambda (&rest _)
+      (make-local-variable 'company-backends)
+      (add-to-list 'company-backends 'hledger-company))))
+
+(use-package! hledger-input
+  :disabled
+  :hook ((hledger-input-post-commit . hledger-show-new-balances)
+         (hledger-input-mode . auto-fill-mode)
+         (hledger-input-mode . (lambda (&rest _)
+                                 (make-local-variable 'compay-idle-delay)
+                                 (setq-local company-idle-delay 0.1))))
+  :init
+  (setq hledger-input-buffer-height 20))
+
+;;
+;;; Kubernetes
+;;
 
 (use-package! kubernetes
   :defer t
diff --git a/modules/common/emacs/doom/init.el b/modules/common/emacs/doom/init.el
index 4399f05..a76d0e3 100644
--- a/modules/common/emacs/doom/init.el
+++ b/modules/common/emacs/doom/init.el
@@ -12,6 +12,7 @@
        ;; doom-quit
        ;; emoji
        hl-todo
+       hydra
        indent-guides
        ;; ligatures
        ;; modeline
@@ -38,7 +39,7 @@
 
        :emacs
        dired
-       ;; electric
+       electric
        ibuffer
        undo
        vc
diff --git a/modules/nixos/syncthing.nix b/modules/nixos/syncthing.nix
index 399fb6b..8815f98 100644
--- a/modules/nixos/syncthing.nix
+++ b/modules/nixos/syncthing.nix
@@ -106,17 +106,17 @@ in {
                 versioning = trashcan;
               };
               org = {
-                path = "${documents}/org";
+                path = "${documents}/org"; # Configured by Emacs.
                 devices = all;
                 versioning = simple;
               };
               roam = {
-                path = "${documents}/roam";
+                path = "${documents}/roam"; # Configured by Emacs.
                 devices = notOther;
                 versioning = simple;
               };
               elfeed = {
-                path = "${config.my.home}/.elfeed";
+                path = "${config.my.home}/.elfeed"; # Configured by Emacs.
                 devices = notOther;
                 versioning = trashcan;
               };

Consider giving Nix/NixOS a try! <3