aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2026-10-13 01:58:28 -0700
committerGravatar Tom Willemse2026-10-13 01:58:28 -0700
commit94883c1611a1c65b1ef4d5b5ee5471af71d7f5d5 (patch)
tree3ffeccca1a830888aa5cd1855a416e7b870f1722
parent761d87c400423ed9a1bb22d8f6d497e44f6c266d (diff)
downloadnew-dotfiles-94883c1611a1c65b1ef4d5b5ee5471af71d7f5d5.tar.gz
new-dotfiles-94883c1611a1c65b1ef4d5b5ee5471af71d7f5d5.zip
emacs: Specify package dependencies in org file
-rw-r--r--GNUmakefile5
-rw-r--r--emacs/.emacs.d/init.org58
-rw-r--r--oni/home/config/data.scm48
3 files changed, 82 insertions, 29 deletions
diff --git a/GNUmakefile b/GNUmakefile
index efedcf2..e5b56b5 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -39,7 +39,7 @@ before-%-install: # Dummy recipe
## 8t88
-8t88: emacs/.emacs.d/init.el
+8t88: emacs/.emacs.d/init.el emacs/.emacs.d/init.scm
## Picom
@@ -148,6 +148,9 @@ nyxt: nyxt/.config/nyxt/init.lisp
@printf "\e[30;43m FNL \e[0m %s\n" $<
@fennel --compile $^ > $@
+%.scm: %.org
+ $(call tangle,scheme)
+
%: %.org
$(call tangle)
diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org
index d4c3d0e..fc15529 100644
--- a/emacs/.emacs.d/init.org
+++ b/emacs/.emacs.d/init.org
@@ -1,4 +1,17 @@
#+TITLE: Emacs Configuration
+#+property: header-args:scheme :padline no
+
+This configuration requires certain Guix packages to be instaled. For that I'm adding this:
+
+#+begin_src scheme :noweb yes
+ (define emacs-packages '(
+ <<emacs-package>>
+ ))
+
+ (define emacs-services '(
+ <<emacs-service>>
+ ))
+#+end_src
First, lexical binding must be enabled. This is better for performance, but also makes variable binding behave more as expected, and allows the creation of closures.
@@ -634,6 +647,13 @@ Highlight diffs in the fringe.
(setq vertico-posframe-poshandler 'posframe-poshandler-frame-bottom-center))
#+end_src
+This expects the Guix packages:
+
+#+begin_src scheme :noweb-ref emacs-package :tangle no
+ "emacs-vertico"
+ "emacs-vertico-posframe"
+#+end_src
+
* Marginalia
#+begin_src emacs-lisp
@@ -1199,6 +1219,14 @@ Highlight diffs in the fringe.
(use-package fennel-mode)
#+end_src
+This requires the Guix packages:
+
+#+begin_src scheme :noweb-ref emacs-package :tangle no
+ "emacs-fennel-mode"
+ "fennel-ls"
+ "fnlfmt"
+#+end_src
+
* Custom
Change the file where =customize= stores its settings.
@@ -1235,6 +1263,12 @@ This allows me to synchronize tasks and events between my phone and Emacs.
org-caldav-todo-percent-states '((0 "TODO") (1 "NEXT") (100 "DONE"))))
#+end_src
+This requires a guix package:
+
+#+begin_src scheme :noweb-ref emacs-package :tangle no
+ "emacs-org-caldav"
+#+end_src
+
* Wakatime
I run my own [[https://wakapi.dev/][Wakapi]] instance to track my coding time.
@@ -1337,6 +1371,12 @@ Hide all of my minor modes in a single menu item.
(minions-mode))
#+end_src
+Guix package:
+
+#+begin_src scheme :noweb-ref emacs-package :tangle no
+ "emacs-minions"
+#+end_src
+
* Corfu
This is a modern in-buffer completion framework that works a little more nicely with internal existing tools in Emacs than Company does. I've used company for years and it was a big improvement over the previous autocomplete, but now I'm trying this out.
@@ -1444,6 +1484,12 @@ I need to try taking notes with Denote.
(denote-rename-buffer-mode 1))
#+end_src
+Guix package:
+
+#+begin_src scheme :noweb-ref emacs-package :tangle no
+ "emacs-denote"
+#+end_src
+
* Dabbrev
Dynamic abbreviations are one of the completion mechanisms that Emacs supports. I mainly use this with corfu and cape-dabbrev, but when I'm looking for completions I want to see any variant with different letter casings, and also maintain the letter casing of which option I pick.
@@ -1467,6 +1513,12 @@ Emacs comes with built-in typescript mode.
:mode (rx ".ts" eos))
#+end_src
+This package needs the =tree-sitter-typescript= package from Guix for the tree sitter grammars.
+
+#+begin_src scheme :noweb-ref emacs-package :tangle no
+ "tree-sitter-typescript"
+#+end_src
+
* Vterm
Terminal emulator in Emacs. Different from Eshell, which is a shell in Emacs, this runs a shel like bash, zsh, or fish.
@@ -1478,3 +1530,9 @@ The only configuration this adds is that vterm should show the title as set by t
:custom
(vterm-buffer-name-string "*vterm* %s"))
#+end_src
+
+This package needs the =emacs-vterm= package from Guix.
+
+#+begin_src scheme :noweb-ref emacs-package :tangle no
+ "emacs-vterm"
+#+end_src
diff --git a/oni/home/config/data.scm b/oni/home/config/data.scm
index ae50c7c..55439ce 100644
--- a/oni/home/config/data.scm
+++ b/oni/home/config/data.scm
@@ -37,38 +37,30 @@
#:use-module (oni packages pick-random-wallpaper)
#:use-module (oni home services lisp))
+(include "../../../emacs/.emacs.d/init.scm")
+
(home-environment
(packages (append
foreign-distro-compatibility-packages
- (map specification->package '("font-fantasque-sans"
- "font-comic-neue"
- "fuzzel"
- "wezterm"
- "signal-desktop"
- "openssh"
- "keepassxc"
- "font-dosis"
- "swaybg"
- "emacs-geiser-hoot"
- "wayland"
- "emacs-org-journal"
- "emacs-nginx-mode"
- "emacs-fennel-mode"
- "fennel-ls"
- "fnlfmt"
- "emacs-org-caldav"
- "emacs-vertico"
- "emacs-vertico-posframe"
- "emacs-minions"
- "emacs-denote"
- "emacs-prescient"
- "emacs-posframe"
- "emacs-vterm"
-
- ;; Includes tree-sitter-tsx
- "tree-sitter-typescript"
+ (map specification->package
+ (append emacs-packages
+ '("font-fantasque-sans"
+ "font-comic-neue"
+ "fuzzel"
+ "wezterm"
+ "signal-desktop"
+ "openssh"
+ "keepassxc"
+ "font-dosis"
+ "swaybg"
+ "emacs-geiser-hoot"
+ "wayland"
+ "emacs-org-journal"
+ "emacs-nginx-mode"
+ "emacs-prescient"
+ "emacs-posframe"
- "guile-srfi-180"))
+ "guile-srfi-180")))
(list
pick-random-wallpaper
emacs-org-contacts