happysalada 2021-09-06 22:28:10 +09:00 committed by Raphael Megzari
parent 6e17c53b98
commit f4b40d572c

View file

@ -8,9 +8,10 @@ let
esConfig = ''
network.host: ${cfg.listenAddress}
cluster.name: ${cfg.cluster_name}
${lib.optionalString cfg.single_node "discovery.type: single-node"}
http.port: ${toString cfg.port}
transport.tcp.port: ${toString cfg.tcp_port}
transport.port: ${toString cfg.tcp_port}
${cfg.extraConf}
'';
@ -77,6 +78,12 @@ in
type = types.str;
};
single_node = mkOption {
description = "Start a single-node cluster";
default = true;
type = types.bool;
};
extraConf = mkOption {
description = "Extra configuration for elasticsearch.";
default = "";