diff --git a/nix/nixos/cardano-node-service.nix b/nix/nixos/cardano-node-service.nix index bb61dfd9235..63fd30042dc 100644 --- a/nix/nixos/cardano-node-service.nix +++ b/nix/nixos/cardano-node-service.nix @@ -210,7 +210,7 @@ in { type = types.path; default = commonLib.mkEdgeTopology { inherit (cfg) port; - inherit (envConfig) edgeNodes; + edgeNodes = [ envConfig.relaysNew ]; }; description = '' Cluster topology diff --git a/nix/scripts.nix b/nix/scripts.nix index c1bf8f0d65e..0994c949591 100644 --- a/nix/scripts.nix +++ b/nix/scripts.nix @@ -44,7 +44,12 @@ let topologyFile = let edgePort = if config.useProxy then config.proxyPort else config.edgePort; edgeHost = if config.useProxy then config.proxyHost else config.edgeHost; - edgeNodes = if config.useProxy then [] else config.edgeNodes; + hasCustomEdgeNodes = __hasAttr "edgeNodes" customConfig; + hasRelaysNew = __hasAttr "relaysNew" config; + edgeNodes = let + relaysNodes = [ config.relaysNew ]; + edgeNodes' = if (hasCustomEdgeNodes || !hasRelaysNew) then config.edgeNodes else relaysNodes; + in if config.useProxy then [] else edgeNodes'; in config.topologyFile or mkEdgeTopology { inherit (config) hostAddr port; inherit edgeNodes edgeHost edgePort;