M home/home-configuration.scm => home/home-configuration.scm +2 -0
@@ 28,6 28,7 @@
(ruther home dwl scripts)
(ruther home packages themes)
(ruther home services hydroxide)
+ (ruther home services mpris-ctld)
(ruther home services gtk)
(ruther home services xdg-desktop-portals)
(ruther home services wayland)
@@ 267,6 268,7 @@ exec ~a ~a"
(home-emacs-configuration
(emacs emacs-pgtk)))
(service hydroxide-service-type)
+ (service mpris-ctld-service-type)
(service home-blueman-applet-service-type)
(service home-network-manager-applet-service-type)
(service home-gammastep-service-type)
A home/modules/ruther/home/services/mpris-ctld.scm => home/modules/ruther/home/services/mpris-ctld.scm +33 -0
@@ 0,0 1,33 @@
+(define-module (ruther home services mpris-ctld)
+ #:use-module (guix gexp)
+ #:use-module (ruther packages ruther)
+ #:use-module (gnu packages mail)
+ #:use-module (gnu home services)
+ #:use-module (gnu home services shepherd)
+ #:use-module (gnu services shepherd)
+ #:use-module (gnu services configuration)
+ #:use-module (gnu services))
+
+(define-configuration home-mpris-ctld-configuration
+ (mpris-ctl (file-like mpris-ctl) "Mpris-ctl package to use."))
+
+(define (home-mpris-ctld-shepherd-services config)
+ (list
+ (shepherd-service
+ (documentation "Run mpris-ctld")
+ (provision '(mpris-ctld))
+ (requirement '(dbus))
+ (start #~(make-forkexec-constructor
+ (list #$(file-append (home-mpris-ctld-configuration-mpris-ctl config)
+ "/bin/mpris-ctld"))))
+ (stop #~(make-kill-destructor)))))
+
+(define-public mpris-ctld-service-type
+ (service-type
+ (name 'home-hydroxide)
+ (description "Run mpris-ctld daemon for mpris-ctl support.")
+ (default-value (home-mpris-ctld-configuration))
+ (extensions
+ (list
+ (service-extension home-shepherd-service-type
+ home-mpris-ctld-shepherd-services)))))