aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorGuillaume Le Vaillant <glv@posteo.net>2022-01-20 10:08:04 +0100
committerGuillaume Le Vaillant <glv@posteo.net>2022-01-20 14:55:19 +0100
commit1aa269d1d74a7b53ed705def5a8db79fbccb5ce3 (patch)
tree7a05439271c2c351053d70f6e2682f6cb41aeef3 /gnu
parent382800fbf0b9b9cb6697ed4afb936cfaa63dcec2 (diff)
downloadguix-1aa269d1d74a7b53ed705def5a8db79fbccb5ce3.tar
guix-1aa269d1d74a7b53ed705def5a8db79fbccb5ce3.tar.gz
services: guix-publish: Add negative-ttl parameter.
* gnu/services/base.scm (guix-publish-configuration): Add 'negative-ttl' field. (guix-publish-sheperd-service): Process it. * doc/guix.texi (Base Services)[guix-publish-service-type]: Add item for negative-ttl.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/services/base.scm15
1 files changed, 12 insertions, 3 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 345e0ca0f7..fbd01e84d6 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -16,6 +16,7 @@
;;; Copyright © 2021 qblade <qblade@protonmail.com>
;;; Copyright © 2021 Hui Lu <luhuins@163.com>
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2022 Guillaume Le Vaillant <glv@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -196,6 +197,7 @@
guix-publish-configuration-nar-path
guix-publish-configuration-cache
guix-publish-configuration-ttl
+ guix-publish-configuration-negative-ttl
guix-publish-service-type
gpm-configuration
@@ -1828,7 +1830,9 @@ proxy of 'guix-daemon'...~%")
(workers guix-publish-configuration-workers ;#f | integer
(default #f))
(ttl guix-publish-configuration-ttl ;#f | integer
- (default #f)))
+ (default #f))
+ (negative-ttl guix-publish-configuration-negative-ttl ;#f | integer
+ (default #f)))
(define-deprecated (guix-publish-configuration-compression-level config)
"Return a compression level, the old way."
@@ -1863,8 +1867,8 @@ raise a deprecation warning if the 'compression-level' field was used."
lst))))
(match-record config <guix-publish-configuration>
- (guix port host nar-path cache workers ttl cache-bypass-threshold
- advertise?)
+ (guix port host nar-path cache workers ttl negative-ttl
+ cache-bypass-threshold advertise?)
(list (shepherd-service
(provision '(guix-publish))
(requirement `(user-processes
@@ -1890,6 +1894,11 @@ raise a deprecation warning if the 'compression-level' field was used."
#$(number->string ttl)
"s"))
#~())
+ #$@(if negative-ttl
+ #~((string-append "--negative-ttl="
+ #$(number->string negative-ttl)
+ "s"))
+ #~())
#$@(if cache
#~((string-append "--cache=" #$cache)
#$(string-append