{ moduleFunctions }:
let
  inherit (moduleFunctions.instancesFunctions)
    domain0
    sslPath
    varPath
    mntPath
    secretPath
    ;
  label = "Vaultwarden";
  name = "vaultwarden";
  domain = "${name}.${domain0}";
  secrets = "${secretPath}/${name}";
  ssl = "${sslPath}/${name}.${domain0}";
in
{
  label = label;
  name = name;
  short = "Vault";
  email = {
    address0 = "noreply@${domain0}";
  };
  domains = {
    url0 = domain;
  };
  subdomain = name;
  tags = [
    name
    "bitwarden"
    "vault"
    "bit"
    "warden"
  ];
  ports = {
    port0 = 8085;
  };
  interface = {
    id = "vm-${name}";
    mac = "02:00:00:00:51:01";
    idUser = "vmuser-vault";
    macUser = "02:00:00:00:00:01";
    ip = "192.168.50.111";
    gate = "192.168.50.1";
    ssh = 2201;
  };
  ssl = {
    path = ssl;
    cert = "${ssl}/fullchain.pem";
    key = "${ssl}/key.pem";
  };
  varPaths = {
    path0 = "${varPath}/${name}";
  };
  mntPaths = {
    path0 = "${mntPath}/${name}";
  };
  secretPaths = {
    path0 = secrets;
  };
}
