summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--nixos/modules/services/misc/apache-kafka.nix12
1 files changed, 10 insertions, 2 deletions
diff --git a/nixos/modules/services/misc/apache-kafka.nix b/nixos/modules/services/misc/apache-kafka.nix
index 90555ebc468b..5314a096fe0e 100644
--- a/nixos/modules/services/misc/apache-kafka.nix
+++ b/nixos/modules/services/misc/apache-kafka.nix
@@ -116,11 +116,19 @@ in {
       ];
     };
 
+    package = mkOption {
+      description = "The kafka package to use";
+
+      default = pkgs.apacheKafka;
+
+      type = types.package;
+    };
+
   };
 
   config = mkIf cfg.enable {
 
-    environment.systemPackages = [pkgs.apacheKafka];
+    environment.systemPackages = [cfg.package];
 
     users.extraUsers = singleton {
       name = "apache-kafka";
@@ -136,7 +144,7 @@ in {
       serviceConfig = {
         ExecStart = ''
           ${pkgs.jre}/bin/java \
-            -cp "${pkgs.apacheKafka}/libs/*:${configDir}" \
+            -cp "${cfg.package}/libs/*:${configDir}" \
             ${toString cfg.jvmOptions} \
             kafka.Kafka \
             ${configDir}/server.properties