nixos/elasticsearch: rename 'host' to 'listenAddress'

More descriptive option name.
This commit is contained in:
Bjørn Forsman 2015-12-24 00:28:09 +01:00
parent 46924e77a2
commit 7334ecd41a
2 changed files with 4 additions and 3 deletions

View File

@ -16,6 +16,7 @@ with lib;
(mkRenamedOptionModule [ "services" "cadvisor" "host" ] [ "services" "cadvisor" "listenAddress" ])
(mkRenamedOptionModule [ "services" "dockerRegistry" "host" ] [ "services" "dockerRegistry" "listenAddress" ])
(mkRenamedOptionModule [ "services" "elasticsearch" "host" ] [ "services" "elasticsearch" "listenAddress" ])
(mkRenamedOptionModule [ "services" "graphite" "api" "host" ] [ "services" "graphite" "api" "listenAddress" ])
(mkRenamedOptionModule [ "services" "graphite" "web" "host" ] [ "services" "graphite" "web" "listenAddress" ])
(mkRenamedOptionModule [ "services" "mpd" "network" "host" ] [ "services" "mpd" "network" "listenAddress" ])

View File

@ -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}
@ -43,7 +43,7 @@ in {
type = types.package;
};
host = mkOption {
listenAddress = mkOption {
description = "Elasticsearch listen address.";
default = "127.0.0.1";
type = types.str;
@ -142,7 +142,7 @@ in {
ln -s ${esPlugins}/plugins ${cfg.dataDir}/plugins
'';
postStart = mkBefore ''
until ${pkgs.curl}/bin/curl -s -o /dev/null ${cfg.host}:${toString cfg.port}; do
until ${pkgs.curl}/bin/curl -s -o /dev/null ${cfg.listenAddress}:${toString cfg.port}; do
sleep 1
done
'';