48 lines
1.4 KiB
Scheme
48 lines
1.4 KiB
Scheme
|
(define-module (oni home services cmst)
|
||
|
#:use-module (gnu services configuration)
|
||
|
#:use-module (gnu packages connman)
|
||
|
#:use-module (gnu home services)
|
||
|
#:use-module (gnu home services shepherd)
|
||
|
#:use-module (gnu home services utils)
|
||
|
#:use-module (guix packages)
|
||
|
#:use-module (guix gexp)
|
||
|
|
||
|
#:export (home-cmst-service-type
|
||
|
home-cmst-configuration))
|
||
|
|
||
|
(define-configuration home-cmst-configuration
|
||
|
(package
|
||
|
(package cmst)
|
||
|
"Package to use for setting kdeconnect"))
|
||
|
|
||
|
(define (add-cmst-packages config)
|
||
|
(list (home-cmst-configuration-package config)))
|
||
|
|
||
|
(define (home-cmst-shepherd-service config)
|
||
|
(list
|
||
|
(shepherd-service
|
||
|
(documentation "Start CMST")
|
||
|
(provision '(cmst))
|
||
|
(requirement '(statusbar))
|
||
|
(auto-start? #t)
|
||
|
(start
|
||
|
#~(make-forkexec-constructor
|
||
|
(list #$(file-append (home-cmst-configuration-package config) "/bin/cmst")
|
||
|
"--minimized")
|
||
|
#:log-file (format #f "~a/.local/var/log/cmst.log" (getenv "HOME"))))
|
||
|
(stop #~(make-kill-destructor)))))
|
||
|
|
||
|
(define home-cmst-service-type
|
||
|
(service-type
|
||
|
(name 'home-cmst)
|
||
|
(extensions
|
||
|
(list (service-extension
|
||
|
home-profile-service-type
|
||
|
add-cmst-packages)
|
||
|
(service-extension
|
||
|
home-shepherd-service-type
|
||
|
home-cmst-shepherd-service)))
|
||
|
(compose identity)
|
||
|
(default-value (home-cmst-configuration))
|
||
|
(description "Install and configure CMST.")))
|