tang: notify on ready

This commit is contained in:
Daniel Barlow 2024-08-31 23:24:50 +01:00
parent 6287b92000
commit 14abdd9998
1 changed files with 6 additions and 2 deletions

View File

@ -8,13 +8,17 @@ let
in longrun {
inherit name;
buildInputs = [ json-to-fstree ];
notification-fd = 10;
run = ''
set -e
statedir=/run/${name}
mkdir -m 0700 $statedir
mkdir -p -m 0700 $statedir
( in_outputs ${name}
while : ; do
${tangc}/bin/tangc decrypt < ${path} > $statedir/input.json
${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 .
echo ready >&10
sleep ${builtins.toString (interval * 60)}
done
)