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, ... }:
{
services.matrix-appservices.services.whatsapp = {
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