summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorAaron Andersen <aaron@fosslib.net>2021-11-21 13:43:16 -0500
committerGitHub <noreply@github.com>2021-11-21 13:43:16 -0500
commit65bdad31853e4526f45913451fb2a5c46b093807 (patch)
treec06beecf557797ffa941af26a880f0701c6bebb2 /nixos
parent5816eb198fd10d9ad3b9a9fa3a126bb678edcd3b (diff)
parent4639589f8830c5a9e728d716c942fa5e24f0aeaa (diff)
downloadnixpkgs-65bdad31853e4526f45913451fb2a5c46b093807.tar
nixpkgs-65bdad31853e4526f45913451fb2a5c46b093807.tar.gz
nixpkgs-65bdad31853e4526f45913451fb2a5c46b093807.tar.bz2
nixpkgs-65bdad31853e4526f45913451fb2a5c46b093807.tar.lz
nixpkgs-65bdad31853e4526f45913451fb2a5c46b093807.tar.xz
nixpkgs-65bdad31853e4526f45913451fb2a5c46b093807.tar.zst
nixpkgs-65bdad31853e4526f45913451fb2a5c46b093807.zip
Merge pull request #146728 from newAM/sabnzbd-package-option
nixos/sabnzbd: add package option
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/networking/sabnzbd.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/nixos/modules/services/networking/sabnzbd.nix b/nixos/modules/services/networking/sabnzbd.nix
index 43566dfd25c..54eeba1a9ec 100644
--- a/nixos/modules/services/networking/sabnzbd.nix
+++ b/nixos/modules/services/networking/sabnzbd.nix
@@ -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}";
         };
     };
   };