diff --git a/oni/home/config/rincewind.scm b/oni/home/config/rincewind.scm index 4592104..14888fa 100644 --- a/oni/home/config/rincewind.scm +++ b/oni/home/config/rincewind.scm @@ -64,6 +64,10 @@ home-xmodmap-service home-openssh-service home-kitty-service)) + #:use-module ((oni home services autokey) + #:select (home-autokey-service-type)) + #:use-module ((oni home services copyq) + #:select (home-copyq-service-type)) #:use-module ((oni home services dunst) #:select (home-dunst-default-service)) #:use-module ((oni home services emacs) @@ -476,4 +480,7 @@ (user-primary-email "tom@ryuslash.org") (user-other-email '("ryuslash@gmail.com" "tom@iactor.nl")) (new-ignore '(".nnmaildir" ".mbsyncstate" ".uidvalidity" - ".mbsyncstate.journal" ".mbsyncstate.new"))))))) + ".mbsyncstate.journal" ".mbsyncstate.new")))) + + (service home-autokey-service-type) + (service home-copyq-service-type)))) diff --git a/oni/home/services/autokey.scm b/oni/home/services/autokey.scm new file mode 100644 index 0000000..3462414 --- /dev/null +++ b/oni/home/services/autokey.scm @@ -0,0 +1,57 @@ +(define-module (oni home services autokey) + #:use-module ((gnu services configuration) + #:select (define-configuration/no-serialization)) + #:use-module ((gnu packages python-xyz) + #:select (autokey)) + #:use-module ((gnu home services) + #:select (service-type + service-extension + home-profile-service-type)) + #:use-module ((gnu home services shepherd) + #:select (home-shepherd-service-type + shepherd-service)) + #:use-module ((guix packages) + #:select (package?)) + #:use-module ((guix gexp) + #:select (gexp + file-append)) + + #:export (home-autokey-service-type + home-autokey-configuration)) + +(define-configuration/no-serialization home-autokey-configuration + (package + (package autokey) + "Package to use for setting autokey") + (auto-start? + (boolean #t) + "Automatically start autokey on startup?")) + +(define (add-autokey-packages config) + (list (home-autokey-configuration-package config))) + +(define (home-autokey-shepherd-service config) + (list + (shepherd-service + (documentation "Start autokey") + (provision '(autokey)) + (auto-start? (home-autokey-configuration-auto-start? config)) + (start + #~(make-forkexec-constructor + (list #$(file-append (home-autokey-configuration-package config) "/bin/autokey-gtk")) + #:log-file (format #f "~a/.local/var/log/autokey.log" (getenv "HOME")))) + (stop #~(make-kill-destructor))))) + +(define home-autokey-service-type + (service-type + (name 'home-autokey) + (extensions + (list (service-extension + home-profile-service-type + add-autokey-packages) + (service-extension + home-shepherd-service-type + home-autokey-shepherd-service))) + (compose identity) + (default-value (home-autokey-configuration)) + (description "Install and configure autokey."))) diff --git a/oni/home/services/copyq.scm b/oni/home/services/copyq.scm new file mode 100644 index 0000000..9016716 --- /dev/null +++ b/oni/home/services/copyq.scm @@ -0,0 +1,57 @@ +(define-module (oni home services copyq) + #:use-module ((gnu services configuration) + #:select (define-configuration/no-serialization)) + #:use-module ((gnu packages xdisorg) + #:select (copyq)) + #:use-module ((gnu home services) + #:select (service-type + service-extension + home-profile-service-type)) + #:use-module ((gnu home services shepherd) + #:select (home-shepherd-service-type + shepherd-service)) + #:use-module ((guix packages) + #:select (package?)) + #:use-module ((guix gexp) + #:select (gexp + file-append)) + + #:export (home-copyq-service-type + home-copyq-configuration)) + +(define-configuration/no-serialization home-copyq-configuration + (package + (package copyq) + "Package to use for settings copyq.") + (auto-start? + (boolean #t) + "Automatically start copyq on startup?")) + +(define (add-copyq-packages config) + (list (home-copyq-configuration-package config))) + +(define (home-copyq-shepherd-service config) + (list + (shepherd-service + (documentation "Start copyq") + (provision '(copyq)) + (auto-start? (home-copyq-configuration-auto-start? config)) + (start + #~(make-forkexec-constructor + (list #$(file-append (home-copyq-configuration-package config) "/bin/copyq")) + #:log-file (format #f "~a/.local/var/log/copyq.log" (getenv "HOME")))) + (stop #~(make-kill-destructor))))) + +(define home-copyq-service-type + (service-type + (name 'home-copyq) + (extensions + (list (service-extension + home-profile-service-type + add-copyq-packages) + (service-extension + home-shepherd-service-type + home-copyq-shepherd-service))) + (compose identity) + (default-value (home-copyq-configuration)) + (description "Install and configure copyq.")))