diff --git a/modules/services/jellyfin.nix b/modules/services/jellyfin.nix index c866cc0..33828d9 100644 --- a/modules/services/jellyfin.nix +++ b/modules/services/jellyfin.nix @@ -18,6 +18,18 @@ upstreams = [{ dial = "localhost:8096"; }]; }]; }]; + + # Create videos directory, allow anyone in Jellyfin group to manage it + system.activationScripts.jellyfin = let videosDirectory = "/var/videos"; + in { + text = '' + if [ ! -d "${videosDirectory}" ]; then + $DRY_RUN_CMD mkdir --parents $VERBOSE_ARG ${videosDirectory} + $DRY_RUN_CMD chmod 775 $VERBOSE_ARG ${videosDirectory} + fi + ''; + }; + }; }