mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 13:28:12 -05:00
services: guix-data-service: Allow passing extra options.
This is so that the options supported by the service configuration don't have to always be changed. Generally though all options should be explicitly supported and documented, so this is mostly to facilitate experimentation. * gnu/services/guix.scm (<guix-data-service-configuration>): Add extra-options and extra-process-jobs-options to the record type. (guix-data-service-shepherd-services): Handle these new configuration record fields. * doc/guix.texi (Guix Data Service): Document these new options.
This commit is contained in:
parent
67d21e2b08
commit
d8ab68b929
2 changed files with 17 additions and 4 deletions
|
@ -25250,6 +25250,12 @@ If set, this is the @code{getmail-retriever-configuration} object with
|
|||
which to configure getmail to fetch mail from the guix-commits mailing
|
||||
list.
|
||||
|
||||
@item @code{extra-options} (default: @var{'()})
|
||||
Extra command line options for @code{guix-data-service}.
|
||||
|
||||
@item @code{extra-process-jobs-options} (default: @var{'()})
|
||||
Extra command line options for @code{guix-data-service-process-jobs}.
|
||||
|
||||
@end table
|
||||
@end deftp
|
||||
|
||||
|
|
|
@ -68,7 +68,12 @@ (define-record-type* <guix-data-service-configuration>
|
|||
(default #f))
|
||||
(commits-getmail-retriever-configuration
|
||||
guix-data-service-commits-getmail-retriever-configuration
|
||||
(default #f)))
|
||||
(default #f))
|
||||
(extra-options guix-data-service-extra-options
|
||||
(default '()))
|
||||
(extra-process-jobs-options
|
||||
guix-data-service-extra-process-jobs-options
|
||||
(default '())))
|
||||
|
||||
(define (guix-data-service-profile-packages config)
|
||||
"Return the guix-data-service package, this will populate the
|
||||
|
@ -78,7 +83,7 @@ (define (guix-data-service-profile-packages config)
|
|||
|
||||
(define (guix-data-service-shepherd-services config)
|
||||
(match-record config <guix-data-service-configuration>
|
||||
(package user group port host)
|
||||
(package user group port host extra-options extra-process-jobs-options)
|
||||
(list
|
||||
(shepherd-service
|
||||
(documentation "Guix Data Service web server")
|
||||
|
@ -92,7 +97,8 @@ (define (guix-data-service-shepherd-services config)
|
|||
#$(string-append "--host=" host)
|
||||
;; Perform any database migrations when the
|
||||
;; service is started
|
||||
"--update-database")
|
||||
"--update-database"
|
||||
#$@extra-options)
|
||||
|
||||
#:user #$user
|
||||
#:group #$group
|
||||
|
@ -117,7 +123,8 @@ (define (guix-data-service-shepherd-services config)
|
|||
(start #~(make-forkexec-constructor
|
||||
(list
|
||||
#$(file-append package
|
||||
"/bin/guix-data-service-process-jobs"))
|
||||
"/bin/guix-data-service-process-jobs")
|
||||
#$@extra-process-jobs-options)
|
||||
#:user #$user
|
||||
#:group #$group
|
||||
#:environment-variables
|
||||
|
|
Loading…
Reference in a new issue