aboutsummaryrefslogtreecommitdiff
path: root/gnu/services/base.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-01-08 10:38:39 +0100
committerLudovic Courtès <ludo@gnu.org>2018-01-08 10:40:17 +0100
commitf4596f7630ba8d281b972ebd40fd9947ef79e957 (patch)
treec85dc68a3ad8695f18b93d960e1517a48672671a /gnu/services/base.scm
parent767d24e83b0fdd1ee6f0f54333412328e858174e (diff)
downloadguix-f4596f7630ba8d281b972ebd40fd9947ef79e957.tar
guix-f4596f7630ba8d281b972ebd40fd9947ef79e957.tar.gz
services: guix: Add 'log-compression' option.
* gnu/services/base.scm (<guix-configuration>)[log-compression]: New field. (guix-shepherd-service): Use 'match-record' instead of 'match'. Honor 'log-compression'. * doc/guix.texi (Base Services): Document 'log-compression'.
Diffstat (limited to 'gnu/services/base.scm')
-rw-r--r--gnu/services/base.scm68
1 files changed, 34 insertions, 34 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index f4681c804d..7c20232a63 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com>
;;; Copyright © 2015, 2016 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
@@ -1438,6 +1438,8 @@ failed to register hydra.gnu.org public key: ~a~%" status))))))))
(default 0))
(timeout guix-configuration-timeout ;integer
(default 0))
+ (log-compression guix-configuration-log-compression
+ (default 'bzip2))
(extra-options guix-configuration-extra-options ;list of strings
(default '()))
(log-file guix-configuration-log-file ;string
@@ -1452,39 +1454,37 @@ failed to register hydra.gnu.org public key: ~a~%" status))))))))
(define (guix-shepherd-service config)
"Return a <shepherd-service> for the Guix daemon service with CONFIG."
- (match config
- (($ <guix-configuration> guix build-group build-accounts
- authorize-key? keys
- use-substitutes? substitute-urls
- max-silent-time timeout
- extra-options
- log-file http-proxy tmpdir)
- (list (shepherd-service
- (documentation "Run the Guix daemon.")
- (provision '(guix-daemon))
- (requirement '(user-processes))
- (start
- #~(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"))
- "--substitute-urls" #$(string-join substitute-urls)
- #$@extra-options)
-
- #:environment-variables
- (list #$@(if http-proxy
- (list (string-append "http_proxy=" http-proxy))
- '())
- #$@(if tmpdir
- (list (string-append "TMPDIR=" tmpdir))
- '()))
-
- #:log-file #$log-file))
- (stop #~(make-kill-destructor)))))))
+ (match-record config <guix-configuration>
+ (guix build-group build-accounts authorize-key? authorized-keys
+ use-substitutes? substitute-urls max-silent-time timeout
+ log-compression extra-options log-file http-proxy tmpdir)
+ (list (shepherd-service
+ (documentation "Run the Guix daemon.")
+ (provision '(guix-daemon))
+ (requirement '(user-processes))
+ (start
+ #~(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)
+ "--log-compression" #$(symbol->string log-compression)
+ #$@(if use-substitutes?
+ '()
+ '("--no-substitutes"))
+ "--substitute-urls" #$(string-join substitute-urls)
+ #$@extra-options)
+
+ #:environment-variables
+ (list #$@(if http-proxy
+ (list (string-append "http_proxy=" http-proxy))
+ '())
+ #$@(if tmpdir
+ (list (string-append "TMPDIR=" tmpdir))
+ '()))
+
+ #:log-file #$log-file))
+ (stop #~(make-kill-destructor))))))
(define (guix-accounts config)
"Return the user accounts and user groups for CONFIG."