elasticsearch: support version 6
This commit is contained in:
parent
2b65a74aba
commit
b51e813153
@ -5,13 +5,13 @@ with lib;
|
|||||||
let
|
let
|
||||||
cfg = config.services.elasticsearch;
|
cfg = config.services.elasticsearch;
|
||||||
|
|
||||||
|
es7 = builtins.compareVersions cfg.package.version "7" >= 0;
|
||||||
|
|
||||||
esConfig = ''
|
esConfig = ''
|
||||||
network.host: ${cfg.listenAddress}
|
network.host: ${cfg.listenAddress}
|
||||||
cluster.name: ${cfg.cluster_name}
|
cluster.name: ${cfg.cluster_name}
|
||||||
${lib.optionalString cfg.single_node ''
|
${lib.optionalString cfg.single_node "discovery.type: single-node"}
|
||||||
discovery.type: single-node
|
${lib.optionalString (cfg.single_node && es7) "gateway.auto_import_dangling_indices: true"}
|
||||||
gateway.auto_import_dangling_indices: true
|
|
||||||
''}
|
|
||||||
|
|
||||||
http.port: ${toString cfg.port}
|
http.port: ${toString cfg.port}
|
||||||
transport.port: ${toString cfg.tcp_port}
|
transport.port: ${toString cfg.tcp_port}
|
||||||
|
Loading…
Reference in New Issue
Block a user