MyNixOS website logo
option

services.mautrix-whatsapp.settings

config.yaml configuration as a Nix attribute set. Configuration options should match those described in the example configuration. Get an example configuration by executing mautrix-whatsapp -c example.yaml --generate-example-config 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";
    };
    hostname = "[::]";
    hs_token = "";
    id = "whatsapp";
    port = 29318;
    username_template = "whatsapp_{{.}}";
  };
  bridge = {
    command_prefix = "!wa";
    permissions = {
      "*" = "relay";
    };
    relay = {
      enabled = true;
    };
  };
  database = {
    type = "sqlite3-fk-wal";
    uri = "file:/var/lib/mautrix-whatsapp/mautrix-whatsapp.db?_txlock=immediate";
  };
  direct_media = {
    server_key = "";
  };
  double_puppet = {
    secrets = { };
    servers = { };
  };
  encryption = {
    pickle_key = "";
  };
  homeserver = {
    address = "http://localhost:8448";
  };
  logging = {
    min_level = "info";
    writers = [
      {
        format = "pretty-colored";
        time_format = " ";
        type = "stdout";
      }
    ];
  };
  network = {
    displayname_template = "{{or .BusinessName .PushName .Phone}} (WA)";
    history_sync = {
      request_full_sync = true;
    };
    identity_change_notices = true;
  };
  provisioning = {
    shared_secret = "";
  };
  public_media = {
    signing_key = "";
  };
}
Example
{
  appservice = {
    ephemeral_events = false;
    id = "whatsapp";
  };
  backfill = {
    enabled = true;
  };
  bridge = {
    mute_only_on_create = false;
    permissions = {
      "example.com" = "user";
    };
    private_chat_portal_meta = true;
  };
  database = {
    type = "postgres";
    uri = "postgresql:///mautrix_whatsapp?host=/run/postgresql";
  };
  encryption = {
    allow = true;
    default = true;
    pickle_key = "$ENCRYPTION_PICKLE_KEY";
    require = true;
  };
  homeserver = {
    address = "http://[::1]:8008";
    domain = "my-domain.tld";
  };
  matrix = {
    message_status_events = true;
  };
  provisioning = {
    shared_secret = "disable";
  };
}