nixos/apache-kafka: Use version-matched jre

This commit is contained in:
Sarah Brofeldt
2021-03-10 08:10:30 +01:00
parent 08ef827056
commit fd02940262
2 changed files with 23 additions and 1 deletions
+8 -1
View File
@@ -106,6 +106,13 @@ in {
type = types.package;
};
jre = mkOption {
description = "The JRE with which to run Kafka";
default = cfg.package.passthru.jre;
defaultText = "pkgs.apacheKafka.passthru.jre";
type = types.package;
};
};
config = mkIf cfg.enable {
@@ -126,7 +133,7 @@ in {
after = [ "network.target" ];
serviceConfig = {
ExecStart = ''
${pkgs.jre}/bin/java \
${cfg.jre}/bin/java \
-cp "${cfg.package}/libs/*" \
-Dlog4j.configuration=file:${logConfig} \
${toString cfg.jvmOptions} \