summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2021-11-16 19:17:31 +0100
committerGitHub <noreply@github.com>2021-11-16 19:17:31 +0100
commita0a5e0be1cc6b9b37f1a53b55bbbc20c9dba6b43 (patch)
treed6caef943096b751199d673b141642ae2330f931 /nixos
parent0a3a4b3f211fc96084a2088cbac9c4e6085bc49f (diff)
parentef9b3aea0836de44f26f8ece966d13a006fda1f0 (diff)
downloadnixpkgs-a0a5e0be1cc6b9b37f1a53b55bbbc20c9dba6b43.tar
nixpkgs-a0a5e0be1cc6b9b37f1a53b55bbbc20c9dba6b43.tar.gz
nixpkgs-a0a5e0be1cc6b9b37f1a53b55bbbc20c9dba6b43.tar.bz2
nixpkgs-a0a5e0be1cc6b9b37f1a53b55bbbc20c9dba6b43.tar.lz
nixpkgs-a0a5e0be1cc6b9b37f1a53b55bbbc20c9dba6b43.tar.xz
nixpkgs-a0a5e0be1cc6b9b37f1a53b55bbbc20c9dba6b43.tar.zst
nixpkgs-a0a5e0be1cc6b9b37f1a53b55bbbc20c9dba6b43.zip
Merge pull request #139553 from andrew-d/andrew/plex-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 5f99ee866a5..7c97069aaf7 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