mirror of
https://codeberg.org/hako/Rosenthal.git
synced 2026-11-29 22:58:06 +00:00
services: jellyfin: Use the contract system.
This commit is contained in:
1 file changed
+9
-7
@@ -7,8 +7,10 @@
|
|||||||
#:use-module (guix modules)
|
#:use-module (guix modules)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix records)
|
#:use-module (guix records)
|
||||||
|
#:use-module (rosenthal utils contract combinators)
|
||||||
#:use-module (rosenthal utils file)
|
#:use-module (rosenthal utils file)
|
||||||
#:use-module (rosenthal utils predicates)
|
#:use-module (rosenthal utils predicates)
|
||||||
|
#:use-module (rosenthal utils records)
|
||||||
;; Guix origin methods
|
;; Guix origin methods
|
||||||
#:use-module (guix download)
|
#:use-module (guix download)
|
||||||
;; Guix System
|
;; Guix System
|
||||||
@@ -392,7 +394,7 @@ test its configuration file."))
|
|||||||
;;; Jellyfin media system (Native, currently written for the Nix package).
|
;;; Jellyfin media system (Native, currently written for the Nix package).
|
||||||
;;;
|
;;;
|
||||||
|
|
||||||
(define-record-type* <jellyfin-configuration>
|
(define-record-type/dolly <jellyfin-configuration>
|
||||||
jellyfin-configuration
|
jellyfin-configuration
|
||||||
make-jellyfin-configuration
|
make-jellyfin-configuration
|
||||||
jellyfin-configuration?
|
jellyfin-configuration?
|
||||||
@@ -462,8 +464,8 @@ test its configuration file."))
|
|||||||
(documentation
|
(documentation
|
||||||
"Extra command-line options.")))
|
"Extra command-line options.")))
|
||||||
|
|
||||||
(define (jellyfin-account-service config)
|
(define jellyfin-account-service
|
||||||
(match-record config <jellyfin-configuration>
|
(match-record-lambda/dolly <jellyfin-configuration>
|
||||||
(data-directory user group)
|
(data-directory user group)
|
||||||
(list (user-group
|
(list (user-group
|
||||||
(name "jellyfin")
|
(name "jellyfin")
|
||||||
@@ -478,8 +480,8 @@ test its configuration file."))
|
|||||||
(shell (file-append shadow "/sbin/nologin"))
|
(shell (file-append shadow "/sbin/nologin"))
|
||||||
(system? #t)))))
|
(system? #t)))))
|
||||||
|
|
||||||
(define (jellyfin-activation-service config)
|
(define jellyfin-activation-service
|
||||||
(match-record config <jellyfin-configuration>
|
(match-record-lambda/dolly <jellyfin-configuration>
|
||||||
(data-directory config-directory cache-directory log-directory)
|
(data-directory config-directory cache-directory log-directory)
|
||||||
#~(let ((owner (getpwnam "jellyfin")))
|
#~(let ((owner (getpwnam "jellyfin")))
|
||||||
(for-each (lambda (dir)
|
(for-each (lambda (dir)
|
||||||
@@ -489,8 +491,8 @@ test its configuration file."))
|
|||||||
cache-directory
|
cache-directory
|
||||||
log-directory)))))
|
log-directory)))))
|
||||||
|
|
||||||
(define (jellyfin-shepherd-service config)
|
(define jellyfin-shepherd-service
|
||||||
(match-record config <jellyfin-configuration>
|
(match-record-lambda/dolly <jellyfin-configuration>
|
||||||
(jellyfin
|
(jellyfin
|
||||||
data-directory config-directory cache-directory log-directory
|
data-directory config-directory cache-directory log-directory
|
||||||
shepherd-requirement extra-options)
|
shepherd-requirement extra-options)
|
||||||
|
|||||||
Reference in new issue
Block a user