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.
This commit is contained in:
parent
5aa1d0c0e8
commit
b144e84ea5
4 changed files with 46 additions and 13 deletions
|
@ -40,6 +40,9 @@
|
||||||
#:select (channel
|
#:select (channel
|
||||||
make-channel-introduction
|
make-channel-introduction
|
||||||
openpgp-fingerprint))
|
openpgp-fingerprint))
|
||||||
|
#:use-module ((guix gexp)
|
||||||
|
#:select (local-file
|
||||||
|
mixed-text-file))
|
||||||
#:use-module ((guix packages)
|
#:use-module ((guix packages)
|
||||||
#:select (package-name))
|
#:select (package-name))
|
||||||
#:use-module ((guix transformations)
|
#:use-module ((guix transformations)
|
||||||
|
@ -107,7 +110,8 @@
|
||||||
emacs-oni-common-lisp
|
emacs-oni-common-lisp
|
||||||
emacs-oni-gui
|
emacs-oni-gui
|
||||||
emacs-oni-magit
|
emacs-oni-magit
|
||||||
emacs-oni-notmuch))
|
emacs-oni-notmuch
|
||||||
|
emacs-oni-hy))
|
||||||
#:use-module ((oni packages hlwm-run-or-raise)
|
#:use-module ((oni packages hlwm-run-or-raise)
|
||||||
#:select (hlwm-run-or-raise))
|
#:select (hlwm-run-or-raise))
|
||||||
#:use-module ((oni packages inbox-size)
|
#:use-module ((oni packages inbox-size)
|
||||||
|
@ -215,6 +219,7 @@
|
||||||
emacs-oni-gui
|
emacs-oni-gui
|
||||||
emacs-oni-magit
|
emacs-oni-magit
|
||||||
emacs-oni-notmuch
|
emacs-oni-notmuch
|
||||||
|
emacs-oni-hy
|
||||||
gforth
|
gforth
|
||||||
recutils
|
recutils
|
||||||
emacs-rec-mode
|
emacs-rec-mode
|
||||||
|
@ -280,7 +285,17 @@
|
||||||
|
|
||||||
(service home-emacs-service-type
|
(service home-emacs-service-type
|
||||||
(home-emacs-configuration
|
(home-emacs-configuration
|
||||||
(package emacs-next)))
|
(package emacs-next)
|
||||||
|
(configurations
|
||||||
|
(list
|
||||||
|
(local-file "../services/emacs/init.el")
|
||||||
|
(mixed-text-file
|
||||||
|
"init.el"
|
||||||
|
"(with-eval-after-load 'hy-mode (require 'oni-hy))\n"
|
||||||
|
"(setq custom-file \"~/.config/emacs/custom.el\")\n"
|
||||||
|
"(load custom-file)\n"
|
||||||
|
"(provide 'init)\n"
|
||||||
|
";;; init.el ends here\n")))))
|
||||||
|
|
||||||
(service home-flameshot-service-type)
|
(service home-flameshot-service-type)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
(define-module (oni home services emacs)
|
(define-module (oni home services emacs)
|
||||||
#:use-module ((gnu services configuration)
|
#:use-module ((gnu services configuration)
|
||||||
#:select (serialize-package
|
#:select (serialize-package
|
||||||
define-configuration))
|
define-configuration
|
||||||
|
text-config?
|
||||||
|
serialize-text-config))
|
||||||
#:use-module ((gnu packages emacs)
|
#:use-module ((gnu packages emacs)
|
||||||
#:select (emacs))
|
#:select (emacs))
|
||||||
#:use-module ((gnu home services)
|
#:use-module ((gnu home services)
|
||||||
|
@ -15,7 +17,8 @@
|
||||||
#:use-module ((guix gexp)
|
#:use-module ((guix gexp)
|
||||||
#:select (gexp
|
#:select (gexp
|
||||||
file-append
|
file-append
|
||||||
local-file))
|
local-file
|
||||||
|
mixed-text-file))
|
||||||
#:use-module ((guix packages)
|
#:use-module ((guix packages)
|
||||||
#:select (package?))
|
#:select (package?))
|
||||||
|
|
||||||
|
@ -25,7 +28,10 @@
|
||||||
(define-configuration home-emacs-configuration
|
(define-configuration home-emacs-configuration
|
||||||
(package
|
(package
|
||||||
(package emacs)
|
(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)
|
(define (add-emacs-packages config)
|
||||||
(list (home-emacs-configuration-package config)))
|
(list (home-emacs-configuration-package config)))
|
||||||
|
@ -44,7 +50,10 @@
|
||||||
(stop #~(make-kill-destructor)))))
|
(stop #~(make-kill-destructor)))))
|
||||||
|
|
||||||
(define (home-emacs-config-files config)
|
(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
|
(define home-emacs-service-type
|
||||||
(service-type
|
(service-type
|
||||||
|
|
|
@ -50,8 +50,3 @@
|
||||||
(with-eval-after-load 'electric
|
(with-eval-after-load 'electric
|
||||||
(add-hook 'electric-quote-inhibit-functions #'oni-in-word-p))
|
(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
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#:use-module (oni packages go))
|
#:use-module (oni packages go))
|
||||||
|
|
||||||
(define-public emacs-oni-config
|
(define-public emacs-oni-config
|
||||||
(let ((commit "e38bb344e4196aa2a1488e9611d1ccecdeb5acd6")
|
(let ((commit "23ff70c4ef428bf554b4448c860e9b61c2db84f4")
|
||||||
(revision "0"))
|
(revision "0"))
|
||||||
(package
|
(package
|
||||||
(name "emacs-oni-config")
|
(name "emacs-oni-config")
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
(commit commit)))
|
(commit commit)))
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "15c7iyx8hisb07dpk6wi1dh8alirz0v7srca986a427b2h6002f1"))))
|
(base32 "04i2xham1zwip85zrx76f1mvkaicnkfyw1bp98wx999igg1vlivx"))))
|
||||||
(build-system emacs-build-system)
|
(build-system emacs-build-system)
|
||||||
(home-page "https://code.ryuslash.org/ryuslash/emacs-config")
|
(home-page "https://code.ryuslash.org/ryuslash/emacs-config")
|
||||||
(synopsis "My Emacs configuration")
|
(synopsis "My Emacs configuration")
|
||||||
|
@ -601,3 +601,17 @@ Emacs")))
|
||||||
emacs-ol-notmuch))
|
emacs-ol-notmuch))
|
||||||
(synopsis "My notmuch configuration for Emacs.")
|
(synopsis "My notmuch configuration for Emacs.")
|
||||||
(description "This package provides my configuration for notmuch.")))
|
(description "This package provides my configuration for notmuch.")))
|
||||||
|
|
||||||
|
(define-public emacs-oni-hy
|
||||||
|
(package
|
||||||
|
(inherit emacs-oni-config)
|
||||||
|
(name "emacs-oni-hy")
|
||||||
|
(arguments
|
||||||
|
'(#:include '("oni-hy\\.el$")))
|
||||||
|
(propagated-inputs
|
||||||
|
(list emacs-hy-mode
|
||||||
|
emacs-oni-paredit
|
||||||
|
emacs-oni-yasnippet
|
||||||
|
emacs-rainbow-delimiters))
|
||||||
|
(synopsis "My Hy configuration")
|
||||||
|
(description "This package provides my configuration for Hy.")))
|
||||||
|
|
Loading…
Reference in a new issue