From 3cd133bc03996bfb0498e05f41c89e86aff34fb6 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sat, 4 Feb 2023 12:21:14 +0100 Subject: Finish an initial implementation of pruning the cached nars --- scripts/nar-herder.in | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'scripts') 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))) -- cgit v1.2.3