Merge pull request #144123 from nh2/logstash-service-jvm-options

nixos/logstash: Add logstashJvmOptionsFile option
This commit is contained in:
Niklas Hambüchen 2021-11-18 02:53:35 +01:00 committed by GitHub
commit a807630064
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,12 +23,16 @@ let
logstashSettingsYml = pkgs.writeText "logstash.yml" cfg.extraSettings;
logstashJvmOptionsFile = pkgs.writeText "jvm.options" cfg.extraJvmOptions;
logstashSettingsDir = pkgs.runCommand "logstash-settings" {
inherit logstashJvmOptionsFile;
inherit logstashSettingsYml;
preferLocalBuild = true;
} ''
mkdir -p $out
ln -s $logstashSettingsYml $out/logstash.yml
ln -s $logstashJvmOptionsFile $out/jvm.options
'';
in
@ -152,6 +156,15 @@ in
'';
};
extraJvmOptions = mkOption {
type = types.lines;
default = "";
description = "Extra JVM options, one per line (jvm.options format).";
example = ''
-Xms2g
-Xmx2g
'';
};
};
};