46 lines
1.5 KiB
Scheme
46 lines
1.5 KiB
Scheme
(define-module (oni home services kdeconnect)
|
|
#:use-module (gnu services configuration)
|
|
#:use-module (gnu packages kde)
|
|
#: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-kdeconnect-service-type
|
|
home-kdeconnect-configuration))
|
|
|
|
(define-configuration home-kdeconnect-configuration
|
|
(package
|
|
(package kdeconnect)
|
|
"Package to use for setting kdeconnect"))
|
|
|
|
(define (add-kdeconnect-packages config)
|
|
(list (home-kdeconnect-configuration-package config)))
|
|
|
|
(define (home-kdeconnect-shepherd-service config)
|
|
(list
|
|
(shepherd-service
|
|
(documentation "Start kdeconnect")
|
|
(provision '(kdeconnect))
|
|
(requirement '(statusbar))
|
|
(auto-start? #t)
|
|
(start
|
|
#~(make-forkexec-constructor
|
|
(list #$(file-append (home-kdeconnect-configuration-package config) "/bin/kdeconnect-indicator"))
|
|
#:log-file (format #f "~a/.local/var/log/kdeconnect.log" (getenv "HOME"))))
|
|
(stop #~(make-kill-destructor)))))
|
|
|
|
(define home-kdeconnect-service-type
|
|
(service-type
|
|
(name 'home-kdeconnect)
|
|
(extensions
|
|
(list (service-extension
|
|
home-profile-service-type
|
|
add-kdeconnect-packages)
|
|
(service-extension
|
|
home-shepherd-service-type
|
|
home-kdeconnect-shepherd-service)))
|
|
(compose identity)
|
|
(default-value (home-kdeconnect-configuration))
|
|
(description "Install and configure kdeconnect.")))
|