diff --git a/oni/home/config/rincewind.scm b/oni/home/config/rincewind.scm index a0e0b05..d198ab5 100644 --- a/oni/home/config/rincewind.scm +++ b/oni/home/config/rincewind.scm @@ -89,7 +89,8 @@ home-emacs-eros-service-type home-emacs-ace-link-service-type home-emacs-ace-link-configuration - home-emacs-golden-ratio-service-type)) + home-emacs-golden-ratio-service-type + home-emacs-pinentry-service-type)) #:use-module ((oni home services environment) #:select (home-environment-service)) #:use-module ((oni home services flameshot) @@ -447,6 +448,7 @@ (goto-address-key "C-S-e") (org-mode-key "C-S-e"))) (service home-emacs-golden-ratio-service-type) + (service home-emacs-pinentry-service-type) (service home-flameshot-service-type) diff --git a/oni/home/services/emacs.scm b/oni/home/services/emacs.scm index 12c62d7..7e6ebad 100644 --- a/oni/home/services/emacs.scm +++ b/oni/home/services/emacs.scm @@ -13,7 +13,8 @@ #:select (emacs-helpful emacs-dashboard emacs-eros - emacs-ace-link)) + emacs-ace-link + emacs-pinentry)) #:use-module ((gnu home services) #:select (service-type service-extension @@ -52,10 +53,15 @@ home-emacs-ace-link-configuration home-emacs-golden-ratio-service-type - home-emacs-golden-ratio-configuration)) + home-emacs-golden-ratio-configuration + + home-emacs-pinentry-service-type + home-emacs-pinentry-configuration)) (define-maybe string) +;;; Emacs + (define-configuration/no-serialization home-emacs-extension (configurations (text-config '()) @@ -116,6 +122,8 @@ (default-value (home-emacs-configuration)) (description "Install and configure Emacs."))) +;;; Emacs Helpful + (define-configuration/no-serialization home-emacs-helpful-configuration (package (package emacs-helpful) @@ -145,6 +153,8 @@ (default-value (home-emacs-helpful-configuration)) (description "Install and configure emacs-helpful."))) +;;; Emacs Yasnippet Capf + (define-configuration/no-serialization home-emacs-yasnippet-capf-configuration (package (package emacs-yasnippet-capf) @@ -178,6 +188,8 @@ (default-value (home-emacs-yasnippet-capf-configuration)) (description "Install and configure emacs-yasnippet-capf."))) +;;; Emacs Dashboard + (define-configuration/no-serialization home-emacs-dashboard-configuration (package (package emacs-dashboard) @@ -212,6 +224,7 @@ (default-value (home-emacs-dashboard-configuration)) (description "Install and configure emacs-dashboard."))) +;;; Emacs Eros (define-configuration/no-serialization home-emacs-eros-configuration (package @@ -246,13 +259,15 @@ (default-value (home-emacs-eros-configuration)) (description "Install and configure emacs-eros."))) +;;; Emacs Ace Link + (define-configuration/no-serialization home-emacs-ace-link-configuration (package (package emacs-ace-link) "Package to use for setting emacs-ace-link.") (default-key - (string "o") - "Key to use as the default keybinding.") + (string "o") + "Key to use as the default keybinding.") (goto-address-key maybe-string "Key to use (if any) to bind with goto-address-mode.") @@ -303,6 +318,8 @@ (default-value (home-emacs-ace-link-configuration)) (description "Install and configure emacs-ace-link."))) +;;; Emacs Golden Ratio + (define-configuration/no-serialization home-emacs-golden-ratio-configuration (package (package emacs-golden-ratio) @@ -339,3 +356,45 @@ (compose identity) (default-value (home-emacs-golden-ratio-configuration)) (description "Install and configure emacs-golden-ratio."))) + +;;; Emacs Pinentry + +(define-configuration/no-serialization home-emacs-pinentry-configuration + (package + (package emacs-pinentry) + "Package to use for setting emacs-pinentry.") + (auto-start? + (boolean #t) + "Should Emacs pinentry be enabled automatically?") + (extra-content + (text-config '()) + "Extra content for emacs-pinentry configuration.")) + +(define (add-emacs-pinentry-configuration config) + (home-emacs-extension + (configurations + (append + (list (mixed-text-file "pinentry-config" + ";;;;; pinentry-config starts here.\n" + (if (home-emacs-pinentry-configuration-auto-start? config) + "(pinentry-start)\n" + "") + ";;;;; pinentry-config ends here.\n")) + (home-emacs-pinentry-configuration-extra-content config))))) + +(define (add-emacs-pinentry-packages config) + (list (home-emacs-pinentry-configuration-package config))) + +(define home-emacs-pinentry-service-type + (service-type + (name 'home-emacs-pinentry) + (extensions + (list (service-extension + home-emacs-service-type + add-emacs-pinentry-configuration) + (service-extension + home-profile-service-type + add-emacs-pinentry-packages))) + (compose identity) + (default-value (home-emacs-pinentry-configuration)) + (description "Install and configure emacs-pinentry.")))