aboutsummaryrefslogtreecommitdiffstats
path: root/oni/home/services
diff options
context:
space:
mode:
authorGravatar Tom Willemse2023-07-14 00:54:48 -0700
committerGravatar Tom Willemse2023-07-14 00:54:48 -0700
commitb144e84ea5b013fdd161287d4d5a6eb12f02e53b (patch)
treecdb428cd1b5049a77caafd8f192dd2f394e805d1 /oni/home/services
parent5aa1d0c0e8069bdce3ff938948bfaeeb1e10c834 (diff)
downloadnew-dotfiles-b144e84ea5b013fdd161287d4d5a6eb12f02e53b.tar.gz
new-dotfiles-b144e84ea5b013fdd161287d4d5a6eb12f02e53b.zip
Add ‘emacs-oni-hy’
I just added a configuration for programming in Hy. This is the first step for moving more of my Emacs configuration into guix home. Instead of adding the autoload for ‘oni-hy’ in the ‘oni-core’ package, I've added it directly to my Guix configuration. In the future I'll want to change this so that each package gets its own configuration and also extends my Emacs configuration so that it automatically adds these autoloads when I add a package.
Diffstat (limited to 'oni/home/services')
-rw-r--r--oni/home/services/emacs.scm17
-rw-r--r--oni/home/services/emacs/init.el5
2 files changed, 13 insertions, 9 deletions
diff --git a/oni/home/services/emacs.scm b/oni/home/services/emacs.scm
index 6f9ec3e..137da8a 100644
--- a/oni/home/services/emacs.scm
+++ b/oni/home/services/emacs.scm
@@ -1,7 +1,9 @@
(define-module (oni home services emacs)
#:use-module ((gnu services configuration)
#:select (serialize-package
- define-configuration))
+ define-configuration
+ text-config?
+ serialize-text-config))
#:use-module ((gnu packages emacs)
#:select (emacs))
#:use-module ((gnu home services)
@@ -15,7 +17,8 @@
#:use-module ((guix gexp)
#:select (gexp
file-append
- local-file))
+ local-file
+ mixed-text-file))
#:use-module ((guix packages)
#:select (package?))
@@ -25,7 +28,10 @@
(define-configuration home-emacs-configuration
(package
(package emacs)
- "Package to use for setting Emacs"))
+ "Package to use for setting Emacs")
+ (configurations
+ (text-config '())
+ "A list of other configuration files to autoload"))
(define (add-emacs-packages config)
(list (home-emacs-configuration-package config)))
@@ -44,7 +50,10 @@
(stop #~(make-kill-destructor)))))
(define (home-emacs-config-files config)
- `((".emacs.d/init.el" ,(local-file "emacs/init.el"))))
+ `((".emacs.d/init.el"
+ ,(mixed-text-file
+ "init.el"
+ (serialize-text-config config (home-emacs-configuration-configurations config))))))
(define home-emacs-service-type
(service-type
diff --git a/oni/home/services/emacs/init.el b/oni/home/services/emacs/init.el
index 87fb81c..b628c81 100644
--- a/oni/home/services/emacs/init.el
+++ b/oni/home/services/emacs/init.el
@@ -50,8 +50,3 @@
(with-eval-after-load 'electric
(add-hook 'electric-quote-inhibit-functions #'oni-in-word-p))
-(setq custom-file "~/.config/emacs/custom.el")
-(load custom-file)
-
-(provide 'init)
-;;; init.el ends here