MyNixOS website logo
option

services.mautrix-whatsapp.settings

config.yaml configuration as a Nix attribute set. Configuration options should match those described in example-config.yaml. Secret tokens should be specified using environmentFile instead of this world-readable attribute set.

Declarations
Type
JSON value
Default
{
  appservice = {
    as_token = "";
    bot = {
      displayname = "WhatsApp Bridge Bot";
      username = "whatsappbot";
    };
    database = {
      type = "sqlite3";
      uri = "/var/lib/mautrix-whatsapp/mautrix-whatsapp.db";
    };
    hostname = "[::]";
    hs_token = "";
    id = "whatsapp";
    port = 29318;
  };
  bridge = {
    command_prefix = "!wa";
    displayname_template = "{{if .BusinessName}}{{.BusinessName}}{{else if .PushName}}{{.PushName}}{{else}}{{.JID}}{{end}} (WA)";
    double_puppet_server_map = { };
    login_shared_secret_map = { };
    permissions = {
      "*" = "relay";
    };
    relay = {
      enabled = true;
    };
    username_template = "whatsapp_{{.}}";
  };
  homeserver = {
    address = "http://localhost:8448";
  };
  logging = {
    min_level = "info";
    writers = [
      {
        format = "pretty-colored";
        time_format = " ";
        type = "stdout";
      }
    ];
  };
}
Example
{
  appservice = {
    database = {
      type = "postgres";
      uri = "postgresql:///mautrix_whatsapp?host=/run/postgresql";
    };
    ephemeral_events = false;
    id = "whatsapp";
  };
  bridge = {
    encryption = {
      allow = true;
      default = true;
      require = true;
    };
    history_sync = {
      request_full_sync = true;
    };
    mute_bridging = true;
    permissions = {
      "example.com" = "user";
    };
    private_chat_portal_meta = true;
    provisioning = {
      shared_secret = "disable";
    };
  };
}