liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 14abdd99981fa000d92c900a5430160cc65572fd
parent 6287b92000ebb56a0f4afee8d3945972a7b189e2
Author: Daniel Barlow <dan@telent.net>
Date:   Sat, 31 Aug 2024 23:24:50 +0100

tang: notify on ready

Diffstat:
Mmodules/secrets/tang.nix | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/modules/secrets/tang.nix b/modules/secrets/tang.nix @@ -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 )