{ config, lib, pkgs, ... }: with lib; let cfg = config.modules.services.jellyfin; in { options.modules.services.jellyfin = { enable = mkEnableOption ""; dataDir = mkOption { type = types.str; }; }; config = mkIf cfg.enable { services.jellyfin = { enable = true; dataDir = cfg.dataDir; }; environment.systemPackages = with pkgs; [ jellyfin-web jellyfin-ffmpeg ]; }; }