aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-02-04 12:21:14 +0100
committerChristopher Baines <mail@cbaines.net>2023-02-04 12:21:14 +0100
commit3cd133bc03996bfb0498e05f41c89e86aff34fb6 (patch)
tree18be85e0d4d171329d9aca89190e0eccaedefc59 /scripts
parentb2ad8e04693759656caa6560315b8325a2079ba1 (diff)
downloadnar-herder-3cd133bc03996bfb0498e05f41c89e86aff34fb6.tar
nar-herder-3cd133bc03996bfb0498e05f41c89e86aff34fb6.tar.gz
Finish an initial implementation of pruning the cached nars
Diffstat (limited to 'scripts')
-rw-r--r--scripts/nar-herder.in11
1 files changed, 10 insertions, 1 deletions
diff --git a/scripts/nar-herder.in b/scripts/nar-herder.in
index 829b23a..2e2563c 100644
--- a/scripts/nar-herder.in
+++ b/scripts/nar-herder.in
@@ -461,6 +461,12 @@
(match-lambda
(('cached-compression-directory . details) details)
(_ #f))
+ opts))
+ (cached-compression-directories-max-sizes
+ (filter-map
+ (match-lambda
+ (('cached-compression-directory-max-size . details) details)
+ (_ #f))
opts)))
(filter-map
(match-lambda
@@ -473,7 +479,10 @@
. ,(or (assq-ref explicit-cached-compression-directories
compression)
(simple-format #f "/var/cache/nar-herder/nar/~A"
- compression)))))))
+ compression)))
+ (directory-max-size
+ . ,(assq-ref cached-compression-directories-max-sizes
+ compression))))))
(_ #f))
opts)))