summary refs log tree commit diff
path: root/nixos/modules/services/misc/apache-kafka.nix
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2015-06-12 15:56:06 -0400
committerShea Levy <shea@shealevy.com>2015-06-12 15:56:06 -0400
commit5ee75e236c0cf758ed6b1188e10448acfcbc93b4 (patch)
treea96daad3cf7d1bd47c1ef857affdd60539f4ed0f /nixos/modules/services/misc/apache-kafka.nix
parent093b2de396c7f6a6ea1fab1dc5f3b527bf672bc9 (diff)
downloadnixpkgs-5ee75e236c0cf758ed6b1188e10448acfcbc93b4.tar
nixpkgs-5ee75e236c0cf758ed6b1188e10448acfcbc93b4.tar.gz
nixpkgs-5ee75e236c0cf758ed6b1188e10448acfcbc93b4.tar.bz2
nixpkgs-5ee75e236c0cf758ed6b1188e10448acfcbc93b4.tar.lz
nixpkgs-5ee75e236c0cf758ed6b1188e10448acfcbc93b4.tar.xz
nixpkgs-5ee75e236c0cf758ed6b1188e10448acfcbc93b4.tar.zst
nixpkgs-5ee75e236c0cf758ed6b1188e10448acfcbc93b4.zip
apache-kafka: Enable overriding the kafka package
Diffstat (limited to 'nixos/modules/services/misc/apache-kafka.nix')
-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 90555ebc468..5314a096fe0 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