summary refs log tree commit diff stats
path: root/modules/matrix/mautrix-whatsapp.nix
blob: a7322d2dd879aac3927cc28a26f79d184b98350c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{ pkgs, libs, config, ... }:
{

  services.mautrix-whatsapp = {
    enable = true;
    settings = {

      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 = {
          "krinitsin.com" = "admin";
        };
        relay = {
          enabled = true;
        };
        username_template = "whatsapp_{{.}}";
      };

      homeserver = {
        address = "http://localhost:8008";
      };

      logging = {
        min_level = "info";
        writers = [
          {
            format = "pretty-colored";
            time_format = " ";
            type = "stdout";
          }
        ];
      };

    };
  };

}