{ moduleFunctions }:
let
  inherit (moduleFunctions.instancesFunctions)
    domain1
    varPath
    mntPath
    secretPath
    sslPath
    emailNoReply
    ;

  name = "forgejo";
  label = "Forgejo";
  subdomain = "source";
  domain = "${subdomain}.${domain1}";
  secrets = "${secretPath}/${name}";
  ssl = "${sslPath}/${domain}";
in
{
  name = name;
  label = label;
  short = label;
  email = {
    address0 = "${emailNoReply}@${domain1}";
  };
  domains = {
    url0 = domain;
  };
  subdomain = subdomain;
  tags = [
    name
    "forge"
    "git"
  ];
  ports = {
    port0 = 3033;
  };
  interface = {
    id = "vm-${name}";
    mac = "02:00:00:00:53:03";
    idUser = "vmuser-${name}";
    macUser = "02:00:00:00:00:03";
    ip = "192.168.50.113";
    gate = "192.168.50.1";
    ssh = 2203;
  };

  ssl = {
    path = ssl;
    cert = "${ssl}/fullchain.pem";
    key = "${ssl}/key.pem";
  };
  varPaths = {
    path0 = "${varPath}/${name}";
  };
  mntPaths = {
    path0 = "${mntPath}/${name}";
  };
  secretPaths = {
    path0 = secrets;
  };
}
