Add cmst and kdeconnect configurations

This commit is contained in:
Tom Willemse 2022-04-19 01:14:14 -07:00
parent f4e0ee160e
commit c52f5ee6c9
3 changed files with 101 additions and 2 deletions

View file

@ -17,7 +17,9 @@
#:use-module (oni home services xbindkeys)
#:use-module (oni home services zsh)
#:use-module (oni home services herbstluftwm)
#:use-module (oni home services polybar))
#:use-module (oni home services polybar)
#:use-module (oni home services kdeconnect)
#:use-module (oni home services cmst))
(home-environment
(packages (list (specification->package+output "glibc-locales")
@ -311,4 +313,8 @@
(service home-polybar-service-type
(home-polybar-configuration
(bar "data"))))))
(bar "data")))
(service home-kdeconnect-service-type)
(service home-cmst-service-type))))

View file

@ -0,0 +1,47 @@
(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.")))

View file

@ -0,0 +1,46 @@
(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.")))