summary refs log tree commit diff
path: root/nixos/modules/services/blockchain/ethereum/geth.nix
diff options
context:
space:
mode:
authorFelix Buehler <account@buehler.rocks>2023-03-19 21:44:31 +0100
committerFelix Buehler <account@buehler.rocks>2023-04-07 13:38:33 +0200
commit327b0cff7aedc20a148d245b1182f43800acc1f5 (patch)
treea498ae1b2dd2289310483d81345903d7e9123cb7 /nixos/modules/services/blockchain/ethereum/geth.nix
parentb392d9b827cf4bb52141ab86e4202ec340f0b181 (diff)
downloadnixpkgs-327b0cff7aedc20a148d245b1182f43800acc1f5.tar
nixpkgs-327b0cff7aedc20a148d245b1182f43800acc1f5.tar.gz
nixpkgs-327b0cff7aedc20a148d245b1182f43800acc1f5.tar.bz2
nixpkgs-327b0cff7aedc20a148d245b1182f43800acc1f5.tar.lz
nixpkgs-327b0cff7aedc20a148d245b1182f43800acc1f5.tar.xz
nixpkgs-327b0cff7aedc20a148d245b1182f43800acc1f5.tar.zst
nixpkgs-327b0cff7aedc20a148d245b1182f43800acc1f5.zip
treewide: use more lib.optionalString
Diffstat (limited to 'nixos/modules/services/blockchain/ethereum/geth.nix')
-rw-r--r--nixos/modules/services/blockchain/ethereum/geth.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/services/blockchain/ethereum/geth.nix b/nixos/modules/services/blockchain/ethereum/geth.nix
index eca308dc366..d12516ca2f2 100644
--- a/nixos/modules/services/blockchain/ethereum/geth.nix
+++ b/nixos/modules/services/blockchain/ethereum/geth.nix
@@ -196,9 +196,9 @@ in
           --gcmode ${cfg.gcmode} \
           --port ${toString cfg.port} \
           --maxpeers ${toString cfg.maxpeers} \
-          ${if cfg.http.enable then ''--http --http.addr ${cfg.http.address} --http.port ${toString cfg.http.port}'' else ""} \
+          ${optionalString cfg.http.enable ''--http --http.addr ${cfg.http.address} --http.port ${toString cfg.http.port}''} \
           ${optionalString (cfg.http.apis != null) ''--http.api ${lib.concatStringsSep "," cfg.http.apis}''} \
-          ${if cfg.websocket.enable then ''--ws --ws.addr ${cfg.websocket.address} --ws.port ${toString cfg.websocket.port}'' else ""} \
+          ${optionalString cfg.websocket.enable ''--ws --ws.addr ${cfg.websocket.address} --ws.port ${toString cfg.websocket.port}''} \
           ${optionalString (cfg.websocket.apis != null) ''--ws.api ${lib.concatStringsSep "," cfg.websocket.apis}''} \
           ${optionalString cfg.metrics.enable ''--metrics --metrics.addr ${cfg.metrics.address} --metrics.port ${toString cfg.metrics.port}''} \
           --authrpc.addr ${cfg.authrpc.address} --authrpc.port ${toString cfg.authrpc.port} --authrpc.vhosts ${lib.concatStringsSep "," cfg.authrpc.vhosts} \