{ moduleFunctions }:
let
  inherit (moduleFunctions.instancesFunctions)
    domain1
    servicePath
    sslPath
    sopsPath
    ;

  label = "Owncast";
  name = "owncast";
  subdomain = "stream";
  domain = "${subdomain}.${domain1}";
in
{
  label = label;
  name = name;
  short = "Cast";
  sops = {
    path0 = "${sopsPath}/${name}";
  };
  domains = {
    url0 = domain;
  };
  subdomain = subdomain;
  tags = [

  ];
  paths = {
    path0 = "${servicePath}/${label}";
    path1 = "/mnt/media/storage/${name}";
  };
  ports = {
    port0 = 9454;
    port1 = 1935;
  };
  ssl = {
    cert = "${sslPath}/${subdomain}.${domain1}/fullchain.pem";
    key = "${sslPath}/${subdomain}.${domain1}/key.pem";
  };
}
