mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 06:45:16 +01:00
elasticsearch: Add option specifying extra command line options
This commit is contained in:
parent
94deea2035
commit
9ff0b303ff
1 changed files with 9 additions and 1 deletions
|
@ -93,6 +93,14 @@ in {
|
|||
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
|
||||
|
@ -104,7 +112,7 @@ in {
|
|||
after = [ "network-interfaces.target" ];
|
||||
environment = { ES_HOME = cfg.dataDir; };
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.elasticsearch}/bin/elasticsearch -Des.path.conf=${configDir}";
|
||||
ExecStart = "${pkgs.elasticsearch}/bin/elasticsearch -Des.path.conf=${configDir} ${toString cfg.extraCmdLineOptions}";
|
||||
User = "elasticsearch";
|
||||
PermissionsStartOnly = true;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue