Skip to content

Commit

Permalink
nixos node svc: use topology.json vs yaml for consistency w/ other cfgs
Browse files Browse the repository at this point in the history
  • Loading branch information
johnalotoski committed Feb 27, 2025
1 parent da5121c commit 548e33a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions nix/nixos/cardano-node-service.nix
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ let
selectTopology = i:
if cfg.topology != null
then cfg.topology
else toFile "topology.yaml" (toJSON (if (cfg.useNewTopology) then assertNewTopology i else oldTopology i));
else toFile "topology.json" (toJSON (if (cfg.useNewTopology) then assertNewTopology i else oldTopology i));

topology = i:
if cfg.useSystemdReload
then "/etc/cardano-node/topology-${toString i}.yaml"
then "/etc/cardano-node/topology-${toString i}.json"
else selectTopology i;

mkScript = cfg:
Expand Down Expand Up @@ -616,7 +616,7 @@ in {
if only the topology file has changed and p2p is in use.
Cardano-node topology files will be stored in /etc as:
/etc/cardano-node/topology-''${toString i}.yaml
/etc/cardano-node/topology-''${toString i}.json
Enabling this option will also allow direct topology edits for tests when a full
service re-deployment is not desired.
Expand Down Expand Up @@ -781,7 +781,7 @@ in {
};

environment.etc = mkIf cfg.useSystemdReload (foldl'
(acc: i: recursiveUpdate acc {"cardano-node/topology-${toString i}.yaml".source = selectTopology i;}) {}
(acc: i: recursiveUpdate acc {"cardano-node/topology-${toString i}.json".source = selectTopology i;}) {}
(range 0 (cfg.instances - 1)));

## TODO: use http://hackage.haskell.org/package/systemd for:
Expand Down

0 comments on commit 548e33a

Please sign in to comment.