mirror of
https://codeberg.org/hako/Rosenthal.git
synced 2025-04-11 00:24:33 +00:00
services: Add komga-service-type.
* rosenthal/services/web.scm (<komga-configuration>): New data type. (%komga-accounts,komga-shepherd-service,komga-service-type): New variables. * README.org (Services): Add komga-service-type.
This commit is contained in:
parent
18758a8415
commit
b46e9132f3
@ -117,6 +117,7 @@ Nonfree Software / 非自由軟件:
|
|||||||
+ iwd-service-type
|
+ iwd-service-type
|
||||||
+ forgejo-service-type
|
+ forgejo-service-type
|
||||||
+ jellyfin-service-type
|
+ jellyfin-service-type
|
||||||
|
+ komga-service-type
|
||||||
+ miniflux-service-type
|
+ miniflux-service-type
|
||||||
+ misskey-service-type
|
+ misskey-service-type
|
||||||
+ qbittorrent-service-type
|
+ qbittorrent-service-type
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#:use-module (guix records)
|
#:use-module (guix records)
|
||||||
#:use-module (gnu packages admin)
|
#:use-module (gnu packages admin)
|
||||||
#:use-module (gnu packages version-control)
|
#:use-module (gnu packages version-control)
|
||||||
|
#:use-module (rosenthal packages binaries)
|
||||||
#:use-module (rosenthal packages web)
|
#:use-module (rosenthal packages web)
|
||||||
#:use-module (gnu services)
|
#:use-module (gnu services)
|
||||||
#:use-module (gnu services admin)
|
#:use-module (gnu services admin)
|
||||||
@ -22,6 +23,9 @@
|
|||||||
jellyfin-configuration
|
jellyfin-configuration
|
||||||
jellyfin-service-type
|
jellyfin-service-type
|
||||||
|
|
||||||
|
komga-configuration
|
||||||
|
komga-service-type
|
||||||
|
|
||||||
misskey-configuration
|
misskey-configuration
|
||||||
misskey-service-type
|
misskey-service-type
|
||||||
|
|
||||||
@ -206,6 +210,64 @@
|
|||||||
(default-value (jellyfin-configuration))
|
(default-value (jellyfin-configuration))
|
||||||
(description "Run Jellyfin, a media system.")))
|
(description "Run Jellyfin, a media system.")))
|
||||||
|
|
||||||
|
|
||||||
|
;;;
|
||||||
|
;;; Komga
|
||||||
|
;;;
|
||||||
|
|
||||||
|
|
||||||
|
(define-configuration komga-configuration
|
||||||
|
(komga
|
||||||
|
(file-like komga-bin)
|
||||||
|
"Package to provide @file{/bin/komga}.")
|
||||||
|
(port
|
||||||
|
(integer 25600)
|
||||||
|
"Port to listen to for the API and web interface.")
|
||||||
|
(auto-start?
|
||||||
|
(boolean #t)
|
||||||
|
"Whether to start automatically.")
|
||||||
|
(no-serialization))
|
||||||
|
|
||||||
|
(define %komga-accounts
|
||||||
|
(list (user-group (name "komga") (system? #t))
|
||||||
|
(user-account
|
||||||
|
(name "komga")
|
||||||
|
(group "komga")
|
||||||
|
(system? #t)
|
||||||
|
(comment "Komga user")
|
||||||
|
(home-directory "/var/lib/komga"))))
|
||||||
|
|
||||||
|
(define komga-shepherd-service
|
||||||
|
(match-record-lambda <komga-configuration>
|
||||||
|
(komga port auto-start?)
|
||||||
|
(list (shepherd-service
|
||||||
|
(documentation "Run Komga.")
|
||||||
|
(provision '(komga))
|
||||||
|
(requirement '(loopback))
|
||||||
|
(start
|
||||||
|
#~(make-forkexec-constructor
|
||||||
|
(list #$(file-append komga "/bin/komga"))
|
||||||
|
#:user "komga"
|
||||||
|
#:group "komga"
|
||||||
|
#:log-file "/var/log/komga.log"
|
||||||
|
#:environment-variables
|
||||||
|
'("KOMGA_CONFIGDIR=/var/lib/komga"
|
||||||
|
#$(string-append "SERVER_PORT=" (number->string port)))))
|
||||||
|
(stop
|
||||||
|
#~(make-kill-destructor))
|
||||||
|
(auto-start? auto-start?)))))
|
||||||
|
|
||||||
|
(define komga-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'komga)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension account-service-type
|
||||||
|
(const %komga-accounts))
|
||||||
|
(service-extension shepherd-root-service-type
|
||||||
|
komga-shepherd-service)))
|
||||||
|
(default-value (komga-configuration))
|
||||||
|
(description "Run Komga.")))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; Misskey
|
;; Misskey
|
||||||
|
Loading…
Reference in New Issue
Block a user