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 = ""; default = "";
description = "Fluentd config."; 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"; description = "Fluentd Daemon";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
serviceConfig = { 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"; ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
}; };
}; };