nixos/sabnzbd: add package option
This commit is contained in:
parent
438aecc5a2
commit
4639589f88
@ -17,6 +17,13 @@ in
|
||||
services.sabnzbd = {
|
||||
enable = mkEnableOption "the sabnzbd server";
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.sabnzbd;
|
||||
defaultText = "pkgs.sabnzbd";
|
||||
description = "The sabnzbd executable package run by the service.";
|
||||
};
|
||||
|
||||
configFile = mkOption {
|
||||
type = types.path;
|
||||
default = "/var/lib/sabnzbd/sabnzbd.ini";
|
||||
@ -63,7 +70,7 @@ in
|
||||
GuessMainPID = "no";
|
||||
User = "${cfg.user}";
|
||||
Group = "${cfg.group}";
|
||||
ExecStart = "${sabnzbd}/bin/sabnzbd -d -f ${cfg.configFile}";
|
||||
ExecStart = "${lib.getBin cfg.package}/bin/sabnzbd -d -f ${cfg.configFile}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user