From 9ad2400a9a85c043a59d80dcd9486172242fc003 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Wed, 27 Sep 2023 23:44:06 -0700 Subject: [PATCH] Add eros to my Emacs configuration --- oni/home/config/rincewind.scm | 4 +++- oni/home/services/emacs.scm | 42 +++++++++++++++++++++++++++++++++-- 2 files changed, 43 insertions(+), 3 deletions(-) diff --git a/oni/home/config/rincewind.scm b/oni/home/config/rincewind.scm index 21e4709..625fc2c 100644 --- a/oni/home/config/rincewind.scm +++ b/oni/home/config/rincewind.scm @@ -75,7 +75,8 @@ home-emacs-helpful-configuration home-emacs-yasnippet-capf-service-type home-emacs-dashboard-service-type - home-emacs-dashboard-configuration)) + home-emacs-dashboard-configuration + home-emacs-eros-service-type)) #:use-module ((oni home services environment) #:select (home-environment-service)) #:use-module ((oni home services flameshot) @@ -414,6 +415,7 @@ (local-file "../services/emacs/oni-helpful.el"))))) (service home-emacs-yasnippet-capf-service-type) (service home-emacs-dashboard-service-type) + (service home-emacs-eros-service-type) (service home-flameshot-service-type) diff --git a/oni/home/services/emacs.scm b/oni/home/services/emacs.scm index 99dd2dd..ebc4220 100644 --- a/oni/home/services/emacs.scm +++ b/oni/home/services/emacs.scm @@ -9,7 +9,8 @@ #:select (emacs)) #:use-module ((gnu packages emacs-xyz) #:select (emacs-helpful - emacs-dashboard)) + emacs-dashboard + emacs-eros)) #:use-module ((gnu home services) #:select (service-type service-extension @@ -39,7 +40,10 @@ home-emacs-yasnippet-capf-configuration home-emacs-dashboard-service-type - home-emacs-dashboard-configuration)) + home-emacs-dashboard-configuration + + home-emacs-eros-service-type + home-emacs-eros-configuration)) (define-configuration/no-serialization home-emacs-extension (configurations @@ -196,3 +200,37 @@ (compose identity) (default-value (home-emacs-dashboard-configuration)) (description "Install and configure emacs-dashboard."))) + + +(define-configuration/no-serialization home-emacs-eros-configuration + (package + (package emacs-eros) + "Package to use for setting emacs-eros.") + (configurations + (text-config '()) + "Configuration for emacs-eros.")) + +(define (add-emacs-eros config) + (home-emacs-extension + (configurations + (append + (list (mixed-text-file "eros-config" + "(eros-mode)\n")) + (home-emacs-eros-configuration-configurations config))))) + +(define (add-emacs-eros-packages config) + (list (home-emacs-eros-configuration-package config))) + +(define home-emacs-eros-service-type + (service-type + (name 'home-emacs-eros) + (extensions + (list (service-extension + home-emacs-service-type + add-emacs-eros) + (service-extension + home-profile-service-type + add-emacs-eros-packages))) + (compose identity) + (default-value (home-emacs-eros-configuration)) + (description "Install and configure emacs-eros.")))