services: guix: Add 'max-silent-time' and 'timeout'.

* gnu/services/base.scm (<guix-configuration>)[max-silent-time]
[timeout]: New fields.
(guix-shepherd-service): Honor them.
* doc/guix.texi (Base Services): Document them.
This commit is contained in:
Ludovic Courtès 2017-06-05 01:41:11 +02:00
parent 368680d819
commit 3bee4b6196
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
2 changed files with 15 additions and 1 deletions

View file

@ -9260,6 +9260,12 @@ Whether to use substitutes.
@item @code{substitute-urls} (default: @var{%default-substitute-urls})
The list of URLs where to look for substitutes by default.
@item @code{max-silent-time} (default: @code{0})
@itemx @code{timeout} (default: @code{0})
The number of seconds of silence and the number of seconds of activity,
respectively, after which a build process times out. A value of zero
disables the timeout.
@item @code{extra-options} (default: @code{'()})
List of extra command-line options for @command{guix-daemon}.

View file

@ -1352,6 +1352,10 @@ (define-record-type* <guix-configuration>
(default #t))
(substitute-urls guix-configuration-substitute-urls ;list of strings
(default %default-substitute-urls))
(max-silent-time guix-configuration-max-silent-time ;integer
(default 0))
(timeout guix-configuration-timeout ;integer
(default 0))
(extra-options guix-configuration-extra-options ;list of strings
(default '()))
(log-file guix-configuration-log-file ;string
@ -1371,7 +1375,9 @@ (define (guix-shepherd-service config)
(match config
(($ <guix-configuration> guix build-group build-accounts
authorize-key? keys
use-substitutes? substitute-urls extra-options
use-substitutes? substitute-urls
max-silent-time timeout
extra-options
log-file lsof http-proxy tmpdir)
(list (shepherd-service
(documentation "Run the Guix daemon.")
@ -1381,6 +1387,8 @@ (define (guix-shepherd-service config)
#~(make-forkexec-constructor
(list #$(file-append guix "/bin/guix-daemon")
"--build-users-group" #$build-group
"--max-silent-time" #$(number->string max-silent-time)
"--timeout" #$(number->string timeout)
#$@(if use-substitutes?
'()
'("--no-substitutes"))