Skip to content

Commit

Permalink
fluentd module: add configurable package option
Browse files Browse the repository at this point in the history
  • Loading branch information
copumpkin committed Jan 27, 2017
1 parent 8a104aa commit ced27b2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion nixos/modules/services/logging/fluentd.nix
Expand Up @@ -21,6 +21,12 @@ in {
default = "";
description = "Fluentd config.";
};

package = mkOption {
type = types.path;
default = pkgs.fluentd;
description = "The fluentd package to use.";
};
};
};

Expand All @@ -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";
};
};
Expand Down

0 comments on commit ced27b2

Please sign in to comment.