commit ea0a654ead2ab86656277ede2d73b86e3851c036
parent 12ef421fb2ec5f6c57d82e8c8943c789fa8c81d3
Author: Daniel Barlow <dan@telent.net>
Date: Mon, 10 Aug 2026 13:17:07 +0100
json-to-fstree expects service directory not .outputs
Diffstat:
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/secrets/outboard.nix b/modules/secrets/outboard.nix
@@ -35,7 +35,7 @@ longrun {
''}
( in_outputs ${name}
while : ; do
- ${json-to-fstree}/bin/json-to-fstree ${url} .
+ ${json-to-fstree}/bin/json-to-fstree ${url} ${placeholder "out"}
sleep ${builtins.toString (interval * 60)}
done
)
diff --git a/modules/secrets/tang.nix b/modules/secrets/tang.nix
@@ -25,7 +25,7 @@ longrun {
while : ; do
${tangc}/bin/tangc decrypt < ${path} > $statedir/.input.json
mv $statedir/.input.json $statedir/input.json
- ${json-to-fstree}/bin/json-to-fstree file://$statedir/input.json .
+ ${json-to-fstree}/bin/json-to-fstree file://$statedir/input.json ${placeholder "out"}
echo ready >&10
sleep ${builtins.toString (interval * 60)}
done
diff --git a/pkgs/json-to-fstree/json-to-fstree.fnl b/pkgs/json-to-fstree/json-to-fstree.fnl
@@ -4,7 +4,7 @@
(local { : setenv : utime } (require :lualinux))
(fn download [url dest]
- (let [state (.. dest "/state")
+ (let [state (.. dest "/.outputs/state")
previously (ll.lstat state 12)]
(setenv "HTTP_ACCEPT" "application/json")
(match (http.fetch url "i" previously)
@@ -16,7 +16,7 @@
(body { : last-modified })
(let [service (svc.open dest)
- lock (.. dest "/.lock")]
+ lock (.. dest "/.outputs/.lock")]
(with-open [fout (io.open lock :w)] (fout:write ""))
(service:output "." (json.decode body))
(with-open [fout (io.open state :w)] (fout:write "ok"))