1
0
forked from clan/clan-core

zerotier-static-peers: add guard condition

This commit is contained in:
a-kenji 2024-06-03 22:42:04 +02:00
parent 87444cd2b8
commit 503ce29c84

View File

@ -20,7 +20,7 @@ let
if builtins.pathExists fullPath then builtins.readFile fullPath else null
) machines;
networkIds = lib.filter (machine: machine != null) networkIdsUnchecked;
networkId = builtins.elemAt networkIds 0;
networkId = if builtins.length networkIds == 0 then null else builtins.elemAt networkIds 0;
in
#TODO:trace on multiple found network-ids
#TODO:trace on no single found networkId