Skip to content

Commit 8f150af

Browse files
MartinNikovPetarKirov
authored andcommitted
config(modules/geth): Use both variables and port in port options
1 parent d86843c commit 8f150af

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

modules/geth/args.nix

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
lib:
22
with lib; {
33
port = mkOption {
4-
type = types.port;
4+
type = types.either types.port (types.enum ["\${PORT}"]);
55
default = 30303;
66
description = "Port number Go Ethereum will be listening on, both TCP and UDP.";
77
};
@@ -16,7 +16,7 @@ with lib; {
1616
};
1717

1818
port = mkOption {
19-
type = types.port;
19+
type = types.either types.port (types.enum ["\${HTTP_PORT}"]);
2020
default = 8545;
2121
description = "Port number of Go Ethereum HTTP API.";
2222
};
@@ -62,7 +62,7 @@ with lib; {
6262
};
6363

6464
port = mkOption {
65-
type = types.port;
65+
type = types.either types.port (types.enum ["\${WS_PORT}"]);
6666
default = 8546;
6767
description = "Port number of Go Ethereum WebSocket API.";
6868
};
@@ -83,7 +83,7 @@ with lib; {
8383
};
8484

8585
port = mkOption {
86-
type = types.port;
86+
type = types.either types.port (types.enum ["\${AUTHRPC_PORT}"]);
8787
default = 8551;
8888
description = "Port number of Go Ethereum Auth RPC API.";
8989
};
@@ -112,7 +112,7 @@ with lib; {
112112
};
113113

114114
port = mkOption {
115-
type = types.port;
115+
type = types.either types.port (types.enum ["METRICS_PORT"]);
116116
default = 6060;
117117
description = "Port number of Go Ethereum metrics service.";
118118
};
@@ -215,7 +215,7 @@ with lib; {
215215

216216
discovery = {
217217
port = mkOption {
218-
type = types.port;
218+
type = types.either types.port (types.enum ["\${DISCOVERY_PORT}"]);
219219
default = 30303;
220220
description = mdDoc "Use a custom UDP port for P2P discovery.";
221221
};

0 commit comments

Comments
 (0)