From 5ee75e236c0cf758ed6b1188e10448acfcbc93b4 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Fri, 12 Jun 2015 15:56:06 -0400 Subject: apache-kafka: Enable overriding the kafka package --- nixos/modules/services/misc/apache-kafka.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'nixos/modules/services') 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 -- cgit 1.4.1