mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-07 02:59:19 +03:00
nixos/apache-kafka: Use version-matched jre
This commit is contained in:
parent
08ef827056
commit
fd02940262
2 changed files with 23 additions and 1 deletions
|
@ -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} \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue