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

  label = "SearXNG";
  name = "searx";
  subdomain = "search";
  domain = "${subdomain}.${domain0}";
in
{
  label = label;
  name = name;
  short = "Sear";
  email = {
    address0 = "noreply@${domain0}";
  };
  sops = {
    path0 = "${sopsPath}/${name}";
  };
  domains = {
    url0 = domain;
  };
  subdomain = subdomain;
  tags = [
    "search"
    "sear"
    "searx"
  ];
  paths = {
    path0 = "${servicePath}/${label}";
  };
  ports = {
    port0 = 8888;
  };
  ssl = {
    cert = "${sslPath}/${subdomain}.${domain0}/fullchain.pem";
    key = "${sslPath}/${subdomain}.${domain0}/key.pem";
  };
}
