This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

superconfig / configs / services / matrix / bridges / mautrix-signal.nix
2.2 kB 76 lines
1{ config, pkgs, ... }: 2{ 3 services.mautrix-signal = { 4 enable = true; 5 registerToSynapse = true; 6 # use pure-Go olm implementation to avoid the insecure libolm dependency 7 package = pkgs.mautrix-signal.override { withGoolm = true; }; 8 settings = { 9 homeserver = { 10 address = "http://[::1]:8008"; 11 domain = "lassul.us"; 12 }; 13 appservice = { 14 address = "http://127.0.0.1:29328"; 15 hostname = "127.0.0.1"; 16 port = 29328; 17 username_template = "signal_{{.}}"; 18 }; 19 database = { 20 type = "postgres"; 21 uri = "postgres:///mautrix-signal?host=/run/postgresql"; 22 }; 23 # mautrix-signal v2 (bridgev2 framework) splits config into multiple 24 # top-level sections; see mautrix-whatsapp.nix for explanation. 25 network = { 26 displayname_template = "{{or .ProfileName .PhoneNumber \"Unknown user\"}} (S)"; 27 }; 28 matrix = { 29 delivery_receipts = false; 30 message_status_events = false; 31 }; 32 encryption = { 33 allow = false; 34 default = false; 35 require = false; 36 }; 37 bridge = { 38 personal_filtering_spaces = true; 39 permissions = { 40 "lassul.us" = "user"; 41 "@lassulus:lassul.us" = "admin"; 42 }; 43 }; 44 logging = { 45 min_level = "info"; 46 writers = [ 47 { 48 type = "stdout"; 49 format = "pretty-colored"; 50 } 51 ]; 52 }; 53 }; 54 }; 55 56 # let synapse read the appservice registration file written by the bridge 57 users.users.matrix-synapse.extraGroups = [ "mautrix-signal" ]; 58 59 services.postgresql = { 60 ensureDatabases = [ "mautrix-signal" ]; 61 ensureUsers = [ 62 { 63 name = "mautrix-signal"; 64 ensureDBOwnership = true; 65 } 66 ]; 67 }; 68 69 # portal mappings, sessions, tokens: losing them means relogin and every 70 # existing Matrix room orphaned 71 lass.backup.state.mautrix-signal.preBackup = '' 72 mkdir -p /var/backup/postgresql 73 ${pkgs.sudo}/bin/sudo -u postgres ${config.services.postgresql.package}/bin/pg_dump \ 74 mautrix-signal | ${pkgs.gzip}/bin/gzip > /var/backup/postgresql/mautrix-signal.sql.gz 75 ''; 76}