From 954c14513a7f8ad074611d1814ebc6dc7d5d518d Mon Sep 17 00:00:00 2001 From: Johannes Kirschbauer Date: Sat, 9 Aug 2025 11:17:16 +0200 Subject: [PATCH] Zerotier: make networkId nullable This prevents vars from evaluating if the var doesn't exist Bootstrapping deadlock --- clanServices/zerotier/shared.nix | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/clanServices/zerotier/shared.nix b/clanServices/zerotier/shared.nix index edff0c290..da70d0214 100644 --- a/clanServices/zerotier/shared.nix +++ b/clanServices/zerotier/shared.nix @@ -9,14 +9,7 @@ let controllerMachine = builtins.head (lib.attrNames roles.controller.machines or { }); networkIdPath = "${config.clan.core.settings.directory}/vars/per-machine/${controllerMachine}/zerotier/zerotier-network-id/value"; - networkId = - if builtins.pathExists networkIdPath then - builtins.readFile networkIdPath - else - builtins.throw '' - No zerotier network id found for ${controllerMachine}. - Please run `clan vars generate ${controllerMachine}` first. - ''; + networkId = if builtins.pathExists networkIdPath then builtins.readFile networkIdPath else null; moons = lib.attrNames (roles.moon.machines or { }); moonIps = builtins.foldl' ( ips: name: