elasticsearch: Add option specifying extra command line options
This commit is contained in:
parent
94deea2035
commit
9ff0b303ff
@ -93,6 +93,14 @@ in {
|
|||||||
Data directory for elasticsearch.
|
Data directory for elasticsearch.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraCmdLineOptions = mkOption {
|
||||||
|
description = "Extra command line options for the elasticsearch launcher";
|
||||||
|
default = [];
|
||||||
|
type = types.listOf types.string;
|
||||||
|
example = [ "-Djava.net.preferIPv4Stack=true" ];
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
###### implementation
|
###### implementation
|
||||||
@ -104,7 +112,7 @@ in {
|
|||||||
after = [ "network-interfaces.target" ];
|
after = [ "network-interfaces.target" ];
|
||||||
environment = { ES_HOME = cfg.dataDir; };
|
environment = { ES_HOME = cfg.dataDir; };
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${pkgs.elasticsearch}/bin/elasticsearch -Des.path.conf=${configDir}";
|
ExecStart = "${pkgs.elasticsearch}/bin/elasticsearch -Des.path.conf=${configDir} ${toString cfg.extraCmdLineOptions}";
|
||||||
User = "elasticsearch";
|
User = "elasticsearch";
|
||||||
PermissionsStartOnly = true;
|
PermissionsStartOnly = true;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user