diff options
author | Tom Willemse | 2023-10-12 17:03:21 -0700 |
---|---|---|
committer | Tom Willemse | 2023-10-12 17:03:21 -0700 |
commit | 3712c888b7c2956a2348177ffc6e816481d63591 (patch) | |
tree | 7b7220bc0ccf0a4677bf67b87f82530ae97ab367 /oni/home/services | |
parent | cb16d6af6182368a2db5a98d3cb62c0de36b676a (diff) | |
download | new-dotfiles-3712c888b7c2956a2348177ffc6e816481d63591.tar.gz new-dotfiles-3712c888b7c2956a2348177ffc6e816481d63591.zip |
Add golden-ratio to Emacs configuration
Diffstat (limited to 'oni/home/services')
-rw-r--r-- | oni/home/services/emacs.scm | 45 |
1 files changed, 43 insertions, 2 deletions
diff --git a/oni/home/services/emacs.scm b/oni/home/services/emacs.scm index 360ce3b..12c62d7 100644 --- a/oni/home/services/emacs.scm +++ b/oni/home/services/emacs.scm @@ -30,7 +30,8 @@ #:use-module ((guix packages) #:select (package?)) #:use-module ((oni packages emacs) - #:select (emacs-yasnippet-capf)) + #:select (emacs-yasnippet-capf + emacs-golden-ratio)) #:export (home-emacs-service-type home-emacs-configuration @@ -48,7 +49,10 @@ home-emacs-eros-configuration home-emacs-ace-link-service-type - home-emacs-ace-link-configuration)) + home-emacs-ace-link-configuration + + home-emacs-golden-ratio-service-type + home-emacs-golden-ratio-configuration)) (define-maybe string) @@ -298,3 +302,40 @@ (compose identity) (default-value (home-emacs-ace-link-configuration)) (description "Install and configure emacs-ace-link."))) + +(define-configuration/no-serialization home-emacs-golden-ratio-configuration + (package + (package emacs-golden-ratio) + "Package to use for setting emacs-golden-ratio.") + (configurations + (text-config '()) + "Configuration for emacs-golden-ratio.")) + +(define (add-emacs-golden-ratio-configuration config) + (home-emacs-extension + (configurations + (append + (list (mixed-text-file "golden-ratio-config" + ";;;;; golden-ratio-config starts here.\n" + "(golden-ratio-mode)\n" + "(with-eval-after-load 'ace-window\n" + " (advice-add 'ace-window :after #'golden-ratio))\n" + ";;;;; golden-ratio-config ends here.\n")) + (home-emacs-golden-ratio-configuration-configurations config))))) + +(define (add-emacs-golden-ratio-packages config) + (list (home-emacs-golden-ratio-configuration-package config))) + +(define home-emacs-golden-ratio-service-type + (service-type + (name 'home-emacs-golden-ratio) + (extensions + (list (service-extension + home-emacs-service-type + add-emacs-golden-ratio-configuration) + (service-extension + home-profile-service-type + add-emacs-golden-ratio-packages))) + (compose identity) + (default-value (home-emacs-golden-ratio-configuration)) + (description "Install and configure emacs-golden-ratio."))) |