mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
services: cuirass: Remove unneeded conditional.
* gnu/services/cuirass.scm (cuirass-shepherd-service): Remove unneeded 'and'.
This commit is contained in:
parent
7b7e5b88fc
commit
46e552cb0f
1 changed files with 59 additions and 61 deletions
|
@ -81,70 +81,68 @@ (define-record-type* <cuirass-configuration>
|
||||||
|
|
||||||
(define (cuirass-shepherd-service config)
|
(define (cuirass-shepherd-service config)
|
||||||
"Return a <shepherd-service> for the Cuirass service with CONFIG."
|
"Return a <shepherd-service> for the Cuirass service with CONFIG."
|
||||||
(and
|
(let ((cuirass (cuirass-configuration-cuirass config))
|
||||||
(cuirass-configuration? config)
|
(cache-directory (cuirass-configuration-cache-directory config))
|
||||||
(let ((cuirass (cuirass-configuration-cuirass config))
|
(web-log-file (cuirass-configuration-web-log-file config))
|
||||||
(cache-directory (cuirass-configuration-cache-directory config))
|
(log-file (cuirass-configuration-log-file config))
|
||||||
(web-log-file (cuirass-configuration-web-log-file config))
|
(user (cuirass-configuration-user config))
|
||||||
(log-file (cuirass-configuration-log-file config))
|
(group (cuirass-configuration-group config))
|
||||||
(user (cuirass-configuration-user config))
|
(interval (cuirass-configuration-interval config))
|
||||||
(group (cuirass-configuration-group config))
|
(database (cuirass-configuration-database config))
|
||||||
(interval (cuirass-configuration-interval config))
|
(ttl (cuirass-configuration-ttl config))
|
||||||
(database (cuirass-configuration-database config))
|
(port (cuirass-configuration-port config))
|
||||||
(ttl (cuirass-configuration-ttl config))
|
(host (cuirass-configuration-host config))
|
||||||
(port (cuirass-configuration-port config))
|
(specs (cuirass-configuration-specifications config))
|
||||||
(host (cuirass-configuration-host config))
|
(use-substitutes? (cuirass-configuration-use-substitutes? config))
|
||||||
(specs (cuirass-configuration-specifications config))
|
(one-shot? (cuirass-configuration-one-shot? config))
|
||||||
(use-substitutes? (cuirass-configuration-use-substitutes? config))
|
(fallback? (cuirass-configuration-fallback? config)))
|
||||||
(one-shot? (cuirass-configuration-one-shot? config))
|
(list (shepherd-service
|
||||||
(fallback? (cuirass-configuration-fallback? config)))
|
(documentation "Run Cuirass.")
|
||||||
(list (shepherd-service
|
(provision '(cuirass))
|
||||||
(documentation "Run Cuirass.")
|
(requirement '(guix-daemon networking))
|
||||||
(provision '(cuirass))
|
(start #~(make-forkexec-constructor
|
||||||
(requirement '(guix-daemon networking))
|
(list (string-append #$cuirass "/bin/cuirass")
|
||||||
(start #~(make-forkexec-constructor
|
"--cache-directory" #$cache-directory
|
||||||
(list (string-append #$cuirass "/bin/cuirass")
|
"--specifications"
|
||||||
"--cache-directory" #$cache-directory
|
#$(scheme-file "cuirass-specs.scm" specs)
|
||||||
"--specifications"
|
"--database" #$database
|
||||||
#$(scheme-file "cuirass-specs.scm" specs)
|
"--ttl" #$(string-append (number->string ttl) "s")
|
||||||
"--database" #$database
|
"--interval" #$(number->string interval)
|
||||||
"--ttl" #$(string-append (number->string ttl) "s")
|
#$@(if use-substitutes? '("--use-substitutes") '())
|
||||||
"--interval" #$(number->string interval)
|
#$@(if one-shot? '("--one-shot") '())
|
||||||
#$@(if use-substitutes? '("--use-substitutes") '())
|
#$@(if fallback? '("--fallback") '()))
|
||||||
#$@(if one-shot? '("--one-shot") '())
|
|
||||||
#$@(if fallback? '("--fallback") '()))
|
|
||||||
|
|
||||||
#:environment-variables
|
#:environment-variables
|
||||||
(list "GIT_SSL_CAINFO=/etc/ssl/certs/ca-certificates.crt"
|
(list "GIT_SSL_CAINFO=/etc/ssl/certs/ca-certificates.crt"
|
||||||
(string-append "GIT_EXEC_PATH=" #$git
|
(string-append "GIT_EXEC_PATH=" #$git
|
||||||
"/libexec/git-core"))
|
"/libexec/git-core"))
|
||||||
|
|
||||||
#:user #$user
|
#:user #$user
|
||||||
#:group #$group
|
#:group #$group
|
||||||
#:log-file #$log-file))
|
#:log-file #$log-file))
|
||||||
(stop #~(make-kill-destructor)))
|
(stop #~(make-kill-destructor)))
|
||||||
(shepherd-service
|
(shepherd-service
|
||||||
(documentation "Run Cuirass web interface.")
|
(documentation "Run Cuirass web interface.")
|
||||||
(provision '(cuirass-web))
|
(provision '(cuirass-web))
|
||||||
(requirement '(guix-daemon networking))
|
(requirement '(guix-daemon networking))
|
||||||
(start #~(make-forkexec-constructor
|
(start #~(make-forkexec-constructor
|
||||||
(list (string-append #$cuirass "/bin/cuirass")
|
(list (string-append #$cuirass "/bin/cuirass")
|
||||||
"--cache-directory" #$cache-directory
|
"--cache-directory" #$cache-directory
|
||||||
"--specifications"
|
"--specifications"
|
||||||
#$(scheme-file "cuirass-specs.scm" specs)
|
#$(scheme-file "cuirass-specs.scm" specs)
|
||||||
"--database" #$database
|
"--database" #$database
|
||||||
"--ttl" #$(string-append (number->string ttl) "s")
|
"--ttl" #$(string-append (number->string ttl) "s")
|
||||||
"--web"
|
"--web"
|
||||||
"--port" #$(number->string port)
|
"--port" #$(number->string port)
|
||||||
"--listen" #$host
|
"--listen" #$host
|
||||||
"--interval" #$(number->string interval)
|
"--interval" #$(number->string interval)
|
||||||
#$@(if use-substitutes? '("--use-substitutes") '())
|
#$@(if use-substitutes? '("--use-substitutes") '())
|
||||||
#$@(if fallback? '("--fallback") '()))
|
#$@(if fallback? '("--fallback") '()))
|
||||||
|
|
||||||
#:user #$user
|
#:user #$user
|
||||||
#:group #$group
|
#:group #$group
|
||||||
#:log-file #$web-log-file))
|
#:log-file #$web-log-file))
|
||||||
(stop #~(make-kill-destructor)))))))
|
(stop #~(make-kill-destructor))))))
|
||||||
|
|
||||||
(define (cuirass-account config)
|
(define (cuirass-account config)
|
||||||
"Return the user accounts and user groups for CONFIG."
|
"Return the user accounts and user groups for CONFIG."
|
||||||
|
|
Loading…
Reference in a new issue