nixos/jackett: add package option

This allows users of the module to override the package to a newer
version. Particularly useful as Jackett warns that old versions may not
work.
This commit is contained in:
David Wood 2019-07-07 12:23:01 +01:00
parent 5510c82fde
commit 7f32961ea2
No known key found for this signature in database
GPG key ID: 2592E76C87381FD9

View file

@ -34,6 +34,13 @@ in
default = "jackett";
description = "Group under which Jackett runs.";
};
package = mkOption {
type = types.package;
default = pkgs.jackett;
defaultText = "pkgs.jackett";
description = "Jackett package to use.";
};
};
};
@ -51,7 +58,7 @@ in
Type = "simple";
User = cfg.user;
Group = cfg.group;
ExecStart = "${pkgs.jackett}/bin/Jackett --NoUpdates --DataFolder '${cfg.dataDir}'";
ExecStart = "${cfg.package}/bin/Jackett --NoUpdates --DataFolder '${cfg.dataDir}'";
Restart = "on-failure";
};
};