Module to automate the setup of matrix appservices

I created a module that makes it very simple to setup matrix appservices, so you no longer have to create dedicated modules for every appservice. I’m able to setup the majority of the appservices I need in around 5 lines of nix config.

The flake/repo contains the module and an overlay with a few appservices that aren’t packaged in nixpkgs. I really recommend trying it out, if you use any matrix appservices, it has made my life a lot easier.

Setting up mautrix-whatsapp can be as easy as:

{ pkgs, ... }:
{ = {
    port = 29180;
    format = "mautrix";
    package = pkgs.mautrix-whatsapp;

And there are options to configure every part of the appservice, including its registration file, important settings, and secrets.

I also submitted a nixpkgs PR to merge the module there, but for the time being I think it would be good for it be its own project, so I can maintain and document it. Universal module for matrix appservices/bridges by Pacman99 · Pull Request #114419 · NixOS/nixpkgs · GitHub


I’ve been using this for mautrix-whatsapp and it works like a charm. Thanks!

I’ve also got the whatsapp bridge up and running but I found that the slack example didn’t work. @Pacman99 - do you know if there’s a suitable pkg in nixpkgs for this at the moment?

slack actively disrupts bridges, i’m not sure if that is by design or by accident.

Some chat networks are more friendly to ‘federation’, some are hostile to any kind of bridges… so vote with your feet.

I urge you you to move away from that platform if your not using their advanced features, which very few people actually require.

this looks cool, thanks! I had considered trying a nixos version of this GitHub - spantaleev/matrix-docker-ansible-deploy: 🐳 Matrix (An open network for secure, decentralized communication) server setup using Ansible and Docker but this looks like a lot of it (most?) already.