Merge pull request #146728 from newAM/sabnzbd-package-option

nixos/sabnzbd: add package option

Changed files
+8 -1
nixos
modules
services
networking
+8 -1
nixos/modules/services/networking/sabnzbd.nix
···
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";
···
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}";
};
};
};