feat(emacs): Add ‘org-modern’ configuration

This commit is contained in:
Tom Willemse 2024-04-19 22:58:03 -07:00
parent cf72a2ebc8
commit fc494ab25b
2 changed files with 47 additions and 4 deletions

View file

@ -96,7 +96,8 @@
home-emacs-golden-ratio-service-type home-emacs-golden-ratio-service-type
home-emacs-pinentry-service-type home-emacs-pinentry-service-type
home-emacs-vterm-service-type home-emacs-vterm-service-type
home-emacs-vterm-configuration)) home-emacs-vterm-configuration
home-emacs-org-modern-service-type))
#:use-module ((oni home services environment) #:use-module ((oni home services environment)
#:select (home-environment-service)) #:select (home-environment-service))
#:use-module ((oni home services flameshot) #:use-module ((oni home services flameshot)
@ -445,6 +446,7 @@
(service home-emacs-vterm-service-type (service home-emacs-vterm-service-type
(home-emacs-vterm-configuration (home-emacs-vterm-configuration
(buffer-name-string "*vterm* %s"))) (buffer-name-string "*vterm* %s")))
(service home-emacs-org-modern-service-type)
(service home-flameshot-service-type) (service home-flameshot-service-type)

View file

@ -15,7 +15,8 @@
emacs-eros emacs-eros
emacs-ace-link emacs-ace-link
emacs-pinentry emacs-pinentry
emacs-vterm)) emacs-vterm
emacs-org-modern))
#:use-module ((gnu home services) #:use-module ((gnu home services)
#:select (service-type #:select (service-type
service-extension service-extension
@ -67,7 +68,10 @@
home-emacs-pinentry-configuration home-emacs-pinentry-configuration
home-emacs-vterm-service-type home-emacs-vterm-service-type
home-emacs-vterm-configuration)) home-emacs-vterm-configuration
home-emacs-org-modern-service-type
home-emacs-org-modern-configuration))
(define-maybe string) (define-maybe string)
@ -538,3 +542,40 @@
(compose identity) (compose identity)
(default-value (home-emacs-vterm-configuration)) (default-value (home-emacs-vterm-configuration))
(description "Install and configure emacs-vterm."))) (description "Install and configure emacs-vterm.")))
;;; Org-modern
(define-configuration/no-serialization home-emacs-org-modern-configuration
(package
(package emacs-org-modern)
"Package to use for setting emacs-org-modern.")
(extra-content
(text-config '())
"Extra content for emacs-org-modern configuration."))
(define (add-emacs-org-modern-configuration config)
(home-emacs-extension
(configurations
(append
(list (mixed-text-file "org-modern-config"
";;;;; org-modern-config starts here.\n"
"(with-eval-after-load 'org (global-org-modern-mode))"
";;;;; org-modern-config ends here.\n"))
(home-emacs-org-modern-configuration-extra-content config)))))
(define (add-emacs-org-modern-packages config)
(list (home-emacs-org-modern-configuration-package config)))
(define home-emacs-org-modern-service-type
(service-type
(name 'home-emacs-org-modern)
(extensions
(list (service-extension
home-emacs-service-type
add-emacs-org-modern-configuration)
(service-extension
home-profile-service-type
add-emacs-org-modern-packages)))
(compose identity)
(default-value (home-emacs-org-modern-configuration))
(description "Install and configure emacs-org-modern.")))