aboutsummaryrefslogtreecommitdiff
path: root/gnu/services/base.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-03-23 14:07:00 +0100
committerLudovic Courtès <ludo@gnu.org>2017-03-24 00:23:29 +0100
commit697ddb8850d7aeb612ec9402e86f82c44edf8c96 (patch)
treeb6bd4a5230d356a22529c50310483f13bc62f6f2 /gnu/services/base.scm
parentf1e900a3b8267846eb3909fbf86e681cbc56203d (diff)
downloadguix-697ddb8850d7aeb612ec9402e86f82c44edf8c96.tar
guix-697ddb8850d7aeb612ec9402e86f82c44edf8c96.tar.gz
services: guix-publish: Add 'compression-level' and 'nar-path' fields.
* gnu/services/base.scm (<guix-publish-configuration>)[compression-level, nar-path]: New fields. (guix-publish-shepherd-service): Honor them. * doc/guix.texi (Base Services): Document them.
Diffstat (limited to 'gnu/services/base.scm')
-rw-r--r--gnu/services/base.scm12
1 files changed, 10 insertions, 2 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 0de83f36c8..95a1ba2a6c 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -127,6 +127,8 @@
guix-publish-configuration-guix
guix-publish-configuration-port
guix-publish-configuration-host
+ guix-publish-configuration-compression-level
+ guix-publish-configuration-nar-path
guix-publish-service
guix-publish-service-type
@@ -1438,11 +1440,15 @@ failed to register hydra.gnu.org public key: ~a~%" status))))))))
(port guix-publish-configuration-port ;number
(default 80))
(host guix-publish-configuration-host ;string
- (default "localhost")))
+ (default "localhost"))
+ (compression-level guix-publish-compression-level ;integer
+ (default 3))
+ (nar-path guix-publish-nar-path ;string
+ (default "nar")))
(define guix-publish-shepherd-service
(match-lambda
- (($ <guix-publish-configuration> guix port host)
+ (($ <guix-publish-configuration> guix port host compression nar-path)
(list (shepherd-service
(provision '(guix-publish))
(requirement '(guix-daemon))
@@ -1450,6 +1456,8 @@ failed to register hydra.gnu.org public key: ~a~%" status))))))))
(list #$(file-append guix "/bin/guix")
"publish" "-u" "guix-publish"
"-p" #$(number->string port)
+ "-C" #$(number->string compression)
+ (string-append "--nar-path=" #$nar-path)
(string-append "--listen=" #$host))))
(stop #~(make-kill-destructor)))))))