summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorAndrew Dunham <andrew@du.nham.ca>2021-09-17 21:12:20 -0400
committerAndrew Dunham <andrew@du.nham.ca>2021-09-26 13:46:07 -0400
commitef9b3aea0836de44f26f8ece966d13a006fda1f0 (patch)
tree5937b177bbe6322adccce4dcf90b3b2af3b7916a /nixos
parent3d85bb08106a3d32350df2786fda62aa7fd49cd8 (diff)
downloadnixpkgs-ef9b3aea0836de44f26f8ece966d13a006fda1f0.tar
nixpkgs-ef9b3aea0836de44f26f8ece966d13a006fda1f0.tar.gz
nixpkgs-ef9b3aea0836de44f26f8ece966d13a006fda1f0.tar.bz2
nixpkgs-ef9b3aea0836de44f26f8ece966d13a006fda1f0.tar.lz
nixpkgs-ef9b3aea0836de44f26f8ece966d13a006fda1f0.tar.xz
nixpkgs-ef9b3aea0836de44f26f8ece966d13a006fda1f0.tar.zst
nixpkgs-ef9b3aea0836de44f26f8ece966d13a006fda1f0.zip
plex: add support for custom scanners
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/misc/plex.nix24
1 files changed, 24 insertions, 0 deletions
diff --git a/nixos/modules/services/misc/plex.nix b/nixos/modules/services/misc/plex.nix
index 7efadf1b9bb..d57f7d20926 100644
--- a/nixos/modules/services/misc/plex.nix
+++ b/nixos/modules/services/misc/plex.nix
@@ -65,6 +65,29 @@ in
         '';
       };
 
+      extraScanners = mkOption {
+        type = types.listOf types.path;
+        default = [];
+        description = ''
+          A list of paths to extra scanners to install in Plex's scanners
+          directory.
+
+          Every time the systemd unit for Plex starts up, all of the symlinks
+          in Plex's scanners directory will be cleared and this module will
+          symlink all of the paths specified here to that directory.
+        '';
+        example = literalExample ''
+          [
+            (fetchFromGitHub {
+              owner = "ZeroQI";
+              repo = "Absolute-Series-Scanner";
+              rev = "773a39f502a1204b0b0255903cee4ed02c46fde0";
+              sha256 = "4l+vpiDdC8L/EeJowUgYyB3JPNTZ1sauN8liFAcK+PY=";
+            })
+          ]
+        '';
+      };
+
       package = mkOption {
         type = types.package;
         default = pkgs.plex;
@@ -113,6 +136,7 @@ in
         # Configuration for our FHS userenv script
         PLEX_DATADIR=cfg.dataDir;
         PLEX_PLUGINS=concatMapStringsSep ":" builtins.toString cfg.extraPlugins;
+        PLEX_SCANNERS=concatMapStringsSep ":" builtins.toString cfg.extraScanners;
 
         # The following variables should be set by the FHS userenv script:
         #   PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR