Skip to content

Commit c005147

Browse files
scottbot95aldoborrero
authored andcommitted
fix: Use correct nimbus validator client binary for gnosis networks
1 parent bceb44b commit c005147

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

modules/nimbus-validator/default.nix

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,13 @@ in {
2929
nimbusValidatorName: let
3030
serviceName = "nimbus-validator-${nimbusValidatorName}";
3131
in
32-
cfg:
32+
cfg: let
33+
bin = let
34+
bins.gnosis = "nimbus_validator_client_gnosis";
35+
bins.chiado = "nimbus_validator_client_gnosis";
36+
in
37+
bins.${cfg.network} or "nimbus_validator_client";
38+
in
3339
nameValuePair serviceName (mkIf cfg.enable {
3440
after = ["network.target"];
3541
wantedBy = ["multi-user.target"];
@@ -44,7 +50,7 @@ in {
4450
then cfg.user
4551
else serviceName;
4652
StateDirectory = serviceName;
47-
ExecStart = "${cfg.package}/bin/nimbus_validator_client ${lib.escapeShellArgs cfg.extraArgs}";
53+
ExecStart = "${cfg.package}/bin/${bin} ${lib.escapeShellArgs cfg.extraArgs}";
4854
MemoryDenyWriteExecute = "false";
4955
}
5056
];

modules/nimbus-validator/options.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@
2424
type = types.nullOr types.str;
2525
description = "Service user";
2626
};
27+
28+
network = mkOption {
29+
type = types.enum ["mainnet" "prater" "sepolia" "holesky" "gnosis" "chiado" "hoodi"];
30+
default = "mainnet";
31+
description = "The Eth2 network to join";
32+
};
2733
};
2834
};
2935
in {

0 commit comments

Comments
 (0)