summary refs log tree commit diff
path: root/nixos/modules/services/search
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/services/search')
-rw-r--r--nixos/modules/services/search/elasticsearch.nix10
1 files changed, 9 insertions, 1 deletions
diff --git a/nixos/modules/services/search/elasticsearch.nix b/nixos/modules/services/search/elasticsearch.nix
index 0d604850d42b..3c32e4a3dfe1 100644
--- a/nixos/modules/services/search/elasticsearch.nix
+++ b/nixos/modules/services/search/elasticsearch.nix
@@ -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;
       };