dotfiles/oni/home/services/kdeconnect.scm

57 lines
1.9 KiB
Scheme
Raw Permalink Normal View History

2022-04-19 10:14:14 +02:00
(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
2024-11-23 08:42:12 +01:00
(shepherd-service
(documentation "Start kdeconnectd")
(provision '(kdeconnectd))
(auto-start? #t)
(start
#~(make-forkexec-constructor
(list #$(file-append (home-kdeconnect-configuration-package config) "/bin/kdeconnectd"))
#:log-file (format #f "~a/.local/var/log/kdeconnectd.log" (getenv "HOME"))))
(stop #~(make-kill-destructor)))
2022-04-19 10:14:14 +02:00
(shepherd-service
(documentation "Start kdeconnect")
(provision '(kdeconnect))
2024-11-23 08:42:12 +01:00
(requirement '(kdeconnectd))
;; (requirement '(statusbar))
2022-04-19 10:14:14 +02:00
(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.")))