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)) + ); }; }; }