{pkgs, ...}: {
  users.groups.multimedia = {};

  systemd.tmpfiles.rules = [
    "d /data/media 0770 - multimedia - -"
    "d /data/media/movie 0770 - multimedia - -"
    "d /data/media/tv 0770 - multimedia - -"
    "d /data/media/torrent 0770 - multimedia - -"
  ];

  services.jellyfin = {
    enable = true;
    group = "multimedia";
    openFirewall = true;
  };
  environment.systemPackages = [
    pkgs.jellyfin
    pkgs.jellyfin-web
    pkgs.jellyfin-ffmpeg
  ];

  services.jellyseerr = {
    enable = true;
    openFirewall = true;
  };

  services.prowlarr = {
    enable = true;
  };

  services.flaresolverr = {
    enable = true;
  };

  services.radarr = {
    enable = true;
    group = "multimedia";
  };

  services.sonarr = {
    enable = true;
    group = "multimedia";
  };

  services.transmission = {
    enable = true;
    group = "multimedia";
    settings = {
      download-dir = "/data/media/torrent";
    };
  };
}
