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