GNU bug report logs -
#61483
[PATCH 0/5] Some basic Home Shepherd Services
Previous Next
Full log
Message #41 received at 61483 <at> debbugs.gnu.org (full text, mbox):
* gnu/home/services/shepherd-xyz.scm
(<home-kodi-configuration>): New type.
(home-kodi-services): New procedure.
(home-kodi-service-type): New variable.
---
gnu/home/services/shepherd-xyz.scm | 41 ++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/gnu/home/services/shepherd-xyz.scm b/gnu/home/services/shepherd-xyz.scm
index 856a5e7246..f5bedf60c7 100644
--- a/gnu/home/services/shepherd-xyz.scm
+++ b/gnu/home/services/shepherd-xyz.scm
@@ -25,6 +25,7 @@ (define-module (gnu home services shepherd-xyz)
#:use-module (gnu home services)
#:use-module (gnu home services shepherd)
+ #:use-module (gnu packages kodi)
#:use-module (gnu packages messaging)
#:use-module (gnu packages ssh)
#:use-module (gnu packages version-control)
@@ -35,6 +36,8 @@ (define-module (gnu home services shepherd-xyz)
#:export (home-git-daemon-configuration
home-git-daemon-service-type
+ home-kodi-configuration
+ home-kodi-service-type
home-ssh-agent-configuration
home-ssh-agent-service-type
home-znc-configuration
@@ -136,6 +139,44 @@ (define home-git-daemon-service-type
(description
"Install and configure the git-daemon as a shepherd service.")))
+
+;;;
+;;; Kodi.
+;;;
+(define-record-type* <home-kodi-configuration>
+ home-kodi-configuration make-home-kodi-configuration
+ home-kodi-configuration?
+ (kodi home-kodi-kodi ;file-like
+ (default kodi))
+ (extra-options home-kodi-extra-options ;list of string
+ (default '())))
+
+(define (home-kodi-services config)
+ "Return a <shepherd-service> for kodi with CONFIG."
+ (match config
+ (($ <home-kodi-configuration> kodi extra-options)
+ (let* ((kodi (file-append kodi "/bin/kodi"))
+ (command `(kodi
+ "-fs"
+ ,@extra-options))
+ (log-file (string-append %user-log-dir "/kodi.log")))
+ (list (shepherd-service
+ (documentation "Run the kodi media center.")
+ (provision '(kodi))
+ (start #~(make-forkexec-constructor '#$command
+ #:log-file #$log-file))
+ (stop #~(make-kill-destructor))))))))
+
+(define home-kodi-service-type
+ (service-type
+ (name 'home-kodi)
+ (default-value (home-kodi-configuration))
+ (extensions
+ (list (service-extension home-shepherd-service-type
+ home-kodi-services)))
+ (description
+ "Install and configure kodi as a shepherd service.")))
+
;;;
;;; Ssh-agent.
--
2.38.1
This bug report was last modified 2 years and 162 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.