commit d4e46dbe2820028f90f122412e90e91bcb3b30e7
parent d1f87a56e0b1b3e95a744a07574a7496d7d5d55c
Author: Daniel Barlow <dan@telent.net>
Date: Sun, 9 Mar 2025 20:35:40 +0000
secrets/subscriber don't depend on the services we're watching
this means a watched service can stop and start without killing
the subscriber, and that we can watch for services that don't
yet exist
Diffstat:
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/modules/secrets/subscriber.nix b/modules/secrets/subscriber.nix
@@ -56,8 +56,5 @@ service.overrideAttrs (o: {
buildInputs = (lim.orEmpty o.buildInputs) ++ optional (watch != []) watcher;
dependencies =
(lim.orEmpty o.dependencies)
- # ++ optionals
- # (watch != [])
- # ([ watcher ] ++ watched-services);
- ;
+ ++ optional (watch != []) watcher;
})
diff --git a/pkgs/watch-outputs/watch-outputs.fnl b/pkgs/watch-outputs/watch-outputs.fnl
@@ -71,7 +71,7 @@
(fn open-services [output-references]
(collect [s p (pairs output-references)]
- (values (assert (svc.open (.. s "/.outputs"))) p)))
+ (values (svc.open (.. s "/.outputs")) p)))
(fn run []
(let [trees {}
@@ -89,7 +89,6 @@
(each [service paths (pairs services)]
(let [new-tree (service:output ".")]
(when (changed? paths (. trees service) new-tree)
- (print "watched path event:" action controlled-service)
(do-action action controlled-service))))))))