{ moduleFunctions }:
let
  inherit (moduleFunctions.instancesFunctions)
    domain0
    sslPath
    varPath
    mntPath
    cachePath
    ;
  label = "Jellyfin";
  name = "jellyfin";
  domain = "${name}.${domain0}";
  ssl = "${sslPath}/${name}.${domain0}";
in
{
  label = label;
  name = name;
  short = "Jelly";
  email = {
    address0 = "noreply@${domain0}";
  };
  domains = {
    url0 = domain;
  };
  tags = [
    "jelly"
    "video"
    "streaming"
    "movies"
    "shows"
    "music"
  ];
  subdomain = name;
  ports = {
    port0 = 8096; # Jellyfin HTTP
    port1 = 5055; # Jellyseer
    port2 = 8920; # Jellyfin HTTPS
  };
  interface = {
    id = "vm-${name}";
    mac = "02:00:00:00:52:02";
    idUser = "vmuser-${name}";
    macUser = "02:00:00:00:00:02";
    ip = "192.168.50.112";
    gate = "192.168.50.1";
    ssh = 2202;
  };
  ssl = {
    path = ssl;
    cert = "${ssl}/fullchain.pem";
    key = "${ssl}/key.pem";
  };
  varPaths = {
    path0 = "${varPath}/${name}";
    path1 = "${cachePath}/${name}";
    path2 = "${varPath}/${name}-media";
  };
  mntPaths = {
    path0 = "${mntPath}/${name}";
  };
}
