From c3f4e7ade6431523b5cc10f5776a621d6a4c7857 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Sun, 8 Dec 2024 12:49:46 +0100 Subject: [PATCH] fix(meta): Only define targetHost when the network config is defined --- meta/options.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meta/options.nix b/meta/options.nix index 0926f89..e26e32c 100644 --- a/meta/options.nix +++ b/meta/options.nix @@ -205,11 +205,12 @@ in config = { deployment = { tags = [ "infra-${config.site}" ]; - targetHost = + targetHost = mkIf (builtins.hasAttr name args.config.network) ( let ip = with args.config.network.${name}.addresses; ipv4 ++ ipv6; in - mkIf (ip != [ ]) (mkDefault (builtins.head ip)); + mkIf (ip != [ ]) (mkDefault (builtins.head ip)) + ); }; }; }