3
0
Fork 0
forked from mirrors/nixpkgs

fluentd module: add configurable package option

This commit is contained in:
Dan Peebles 2017-01-27 15:08:17 +00:00
parent 8a104aa085
commit ced27b2966

View file

@ -21,6 +21,12 @@ in {
default = "";
description = "Fluentd config.";
};
package = mkOption {
type = types.path;
default = pkgs.fluentd;
description = "The fluentd package to use.";
};
};
};
@ -32,7 +38,7 @@ in {
description = "Fluentd Daemon";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.fluentd}/bin/fluentd -c ${pkgs.writeText "fluentd.conf" cfg.config}";
ExecStart = "${cfg.package}/bin/fluentd -c ${pkgs.writeText "fluentd.conf" cfg.config}";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
};
};