diff --git a/nix/nixos/cardano-node-service.nix b/nix/nixos/cardano-node-service.nix index 23d7a6cff71..15e679e6d20 100644 --- a/nix/nixos/cardano-node-service.nix +++ b/nix/nixos/cardano-node-service.nix @@ -10,7 +10,7 @@ let svcLib = (import ../svclib.nix { inherit pkgs; cardano-node = pkgs.cardano-node; }); envConfig = cfg.environments.${cfg.environment}; systemdServiceName = "cardano-node${optionalString cfg.instanced "@"}"; mkScript = cfg: - let exec = "cardano-node"; + let exec = "cardano-node run"; cmd = builtins.filter (x: x != "") [ "${cfg.package}/bin/${exec}" "--genesis-file ${cfg.genesisFile}" @@ -184,7 +184,7 @@ in { topology = mkOption { type = types.path; default = localLib.mkEdgeTopology { - inherit (cfg) nodeId port; + inherit (cfg) port; inherit (envConfig) edgeNodes; }; description = '' diff --git a/nix/scripts.nix b/nix/scripts.nix index 333ea39427e..e84b12b394f 100644 --- a/nix/scripts.nix +++ b/nix/scripts.nix @@ -44,7 +44,7 @@ let edgeHost = if config.useProxy then config.proxyHost else config.edgeHost; edgeNodes = if config.useProxy then [] else config.edgeNodes; in config.topologyFile or commonLib.mkEdgeTopology { - inherit (config) hostAddr port nodeId; + inherit (config) hostAddr port; inherit edgeNodes edgeHost edgePort; }; serviceConfig = { diff --git a/nix/sources.json b/nix/sources.json index c7dfe74c365..dceb721dce8 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -48,15 +48,15 @@ "url_template": "https://github.com///archive/.tar.gz" }, "iohk-nix": { - "branch": "master", + "branch": "jordan/update-mkEdgeTopology", "description": "nix scripts shared across projects", "homepage": null, "owner": "input-output-hk", "repo": "iohk-nix", - "rev": "e4a53fa76c111393481d5739f0d7d10782f3cfcb", - "sha256": "1h5jd10pb8a7n18m5f123imw7nzikpawp3vbqsmhysmfazj61gpb", + "rev": "60ba229a02e941ca8aa00782d576bfb38d26100c", + "sha256": "0lchcbk144cmrd0fzmixzf7c0bw4dsv3sx45qva82wa7lria9g1j", "type": "tarball", - "url": "https://github.com/input-output-hk/iohk-nix/archive/e4a53fa76c111393481d5739f0d7d10782f3cfcb.tar.gz", + "url": "https://github.com/input-output-hk/iohk-nix/archive/60ba229a02e941ca8aa00782d576bfb38d26100c.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "niv": { diff --git a/nix/svclib.nix b/nix/svclib.nix index 46d67222c26..acd2e02e68c 100644 --- a/nix/svclib.nix +++ b/nix/svclib.nix @@ -25,10 +25,8 @@ let addr = host-addr; ports = map (x: port-base + x) (range 0 (node-count - 1)); mkPeer = port: { inherit addr port valency; }; - mkNodeTopo = nodeId: port: { - inherit nodeId; - nodeAddress = { inherit addr port; }; - producers = map mkPeer (remove port ports); + mkNodeTopo = port : { + Producers = map mkPeer (remove port ports); }; in toFile "topology.json" (toJSON (imap0 mkNodeTopo ports)); @@ -67,13 +65,10 @@ let ## we choose not to spread ports for this topology shelley-ids = range node-id-base (node-id-base + node-count - 1); mkPeer = id: { inherit valency; port = port-base + id; addr = addr-fn id; }; - mkShelleyNode = id: { - nodeId = id; - nodeAddress = { port = port-base + id; addr = addr-fn id; }; - producers = map (mkPeer) (remove id shelley-ids) ++ - [ { inherit valency; port = proxy-port; addr = proxy-addr; } ]; + mkShelleyNode = { + Producers = map (mkPeer) (remove id shelley-ids); }; - topology = map mkShelleyNode shelley-ids; + topology = mkShelleyNode; in toFile "topology.yaml" (toJSON topology); # Note how some values are literal strings, and some integral.