summaryrefslogtreecommitdiffstats
path: root/push
diff options
context:
space:
mode:
Diffstat (limited to 'push')
-rwxr-xr-xpush8
1 files changed, 7 insertions, 1 deletions
diff --git a/push b/push
index 8041472..1ee11eb 100755
--- a/push
+++ b/push
@@ -16,7 +16,13 @@ set -efu
STOCKHOLM=${STOCKHOLM-$HOME/stockholm}
my_hosts() {
- (cd "$STOCKHOLM" && get "users.$LOGNAME" -l | jq -R -s -c 'split("\n")')
+ make -s -C "$STOCKHOLM" system=$HOSTNAME eval expr='
+ with config.krebs.lib;
+ let my-name = maybeEnv "LOGNAME" (abort "LOGNAME not set"); in
+ toJSON (attrNames (filterAttrs (_: host: host.owner.name == my-name)
+ config.krebs.hosts))
+ ' \
+ | jq -r .
}
all_push_hosts() {