Skip to content

Commit b096195

Browse files
MartinNikovPetarKirov
authored andcommitted
config(modules/nimbus-eth2): Allow using both variables and port in port options
1 parent 6f34e8f commit b096195

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

modules/nimbus-eth2/args.nix

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ with lib; {
1717
};
1818

1919
udp-port = mkOption {
20-
type = types.port;
20+
type = types.either types.port (types.enum ["\${UDP_PORT}"]);
2121
default = 12000;
2222
description = mdDoc "The port used by discv5.";
2323
};
2424

2525
tcp-port = mkOption {
26-
type = types.port;
26+
type = types.either types.port (types.enum ["\${TCP_PORT}"]);
2727
default = 13000;
2828
description = mdDoc "The port used by libp2p.";
2929
};
@@ -69,7 +69,7 @@ with lib; {
6969
description = mdDoc "Metrics address for beacon node.";
7070
};
7171
port = mkOption {
72-
type = types.port;
72+
type = types.either types.port (types.enum ["\${METRICS_PORT}"]);
7373
default = 8008;
7474
description = mdDoc "Metrics port for beacon node.";
7575
};
@@ -84,7 +84,7 @@ with lib; {
8484
};
8585

8686
port = mkOption {
87-
type = types.port;
87+
type = types.either types.port (types.enum ["\${REST_PORT}"]);
8888
default = 5052;
8989
description = mdDoc "Port for the REST API server.";
9090
};
@@ -152,7 +152,7 @@ with lib; {
152152
};
153153

154154
port = mkOption {
155-
type = types.port;
155+
type = types.either types.port (types.enum ["\${KEYMANAGER_PORT}"]);
156156
default = 5052;
157157
description = mdDoc "Listening port for the REST keymanager API.";
158158
};

0 commit comments

Comments
 (0)