From 0b20fef8d54ac60bf31f2dc473f04bd46dea5792 Mon Sep 17 00:00:00 2001 From: "(" Date: Thu, 30 Mar 2023 17:24:05 +0100 Subject: [PATCH] feat(home): readd CUSTOM-FILE replacement to HOME-EMACS-SERVICE-TYPE I accidentally removed a feature when I rewrote HOME-EMACS-SERVICE-TYPE. The default configuration for setting variables with Custom is to write to the init file, which of course is read-only under Guix, so this change sets it to use a new writable '$XDG_CONFIG_HOME/emacs/custom.el' file. --- guixrus/home/services/emacs.scm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/guixrus/home/services/emacs.scm b/guixrus/home/services/emacs.scm index fd4abcf..7bf9375 100644 --- a/guixrus/home/services/emacs.scm +++ b/guixrus/home/services/emacs.scm @@ -143,6 +143,15 @@ EMACS-MINIMAL.") #~(make-forkexec-constructor (list #$(file-append emacs "/bin/emacs") (string-append "--fg-daemon=" #$server) + "--eval" + (format #f "~s" + `(progn + (setq custom-file + ,(format #f "~a/emacs/custom.el" + (or (getenv "XDG_CONFIG_HOME") + (format #f "~a/.config" + (getenv "HOME"))))) + (load custom-file))) #$@(if debug? (list "--debug-init") '())) -- 2.38.5