# manages and downloads films { config, lib, pkgs, ... }: let cfg = config.my.profiles.jellyfin; hostName = config.networking.hostName; port = 8096; in { options.my.profiles.jellyfin = with lib; { enable = mkEnableOption "Media Service"; }; config = lib.mkIf cfg.enable { services.jellyfin = { enable = true; openFirewall = true; }; my.homepage.services = [ { group = "Media"; name = "Jellyfin"; description = "Media server"; href = "http://${hostName}:${toString port}"; icon = "jellyfin.png"; } ]; systemd.services.jellyfin = { after = [ "network-online.target" ]; }; }; }