Add autokey and copyq services
This commit is contained in:
parent
3712c888b7
commit
934b8bbffa
3 changed files with 122 additions and 1 deletions
|
@ -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))))
|
||||
|
|
57
oni/home/services/autokey.scm
Normal file
57
oni/home/services/autokey.scm
Normal file
|
@ -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.")))
|
57
oni/home/services/copyq.scm
Normal file
57
oni/home/services/copyq.scm
Normal file
|
@ -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.")))
|
Loading…
Reference in a new issue