diff options
Diffstat (limited to 'nixos/modules/services/search/elasticsearch.nix')
-rw-r--r-- | nixos/modules/services/search/elasticsearch.nix | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/nixos/modules/services/search/elasticsearch.nix b/nixos/modules/services/search/elasticsearch.nix index 96873987707..e586600cdff 100644 --- a/nixos/modules/services/search/elasticsearch.nix +++ b/nixos/modules/services/search/elasticsearch.nix @@ -6,7 +6,7 @@ let cfg = config.services.elasticsearch; esConfig = '' - network.host: ${cfg.host} + network.host: ${cfg.listenAddress} network.port: ${toString cfg.port} network.tcp.port: ${toString cfg.tcp_port} cluster.name: ${cfg.cluster_name} @@ -40,10 +40,11 @@ in { package = mkOption { description = "Elasticsearch package to use."; default = pkgs.elasticsearch; + defaultText = "pkgs.elasticsearch"; type = types.package; }; - host = mkOption { + listenAddress = mkOption { description = "Elasticsearch listen address."; default = "127.0.0.1"; type = types.str; @@ -142,7 +143,7 @@ in { ln -s ${esPlugins}/plugins ${cfg.dataDir}/plugins ''; postStart = mkBefore '' - until ${pkgs.curl.bin}/bin/curl -s -o /dev/null ${cfg.host}:${toString cfg.port}; do + until ${pkgs.curl.bin}/bin/curl -s -o /dev/null ${cfg.listenAddress}:${toString cfg.port}; do sleep 1 done ''; |