38 lines
859 B
Nix
38 lines
859 B
Nix
{ config
|
|
, lib
|
|
, pkgs
|
|
, inputs
|
|
, ... }:
|
|
|
|
let
|
|
cfg = config.server;
|
|
in {
|
|
imports = [ inputs.maubot.nixosModules.default ];
|
|
|
|
services.nginx.virtualHosts."matrix.${cfg.domainName}".locations = let
|
|
inherit (config.services.maubot) settings;
|
|
in {
|
|
"/_matrix/maubot/" = {
|
|
proxyPass = "http://${lib.quoteListenAddr settings.server.hostname}:${toString settings.server.port}";
|
|
proxyWebsockets = true;
|
|
};
|
|
};
|
|
services.maubot.enable = true;
|
|
services.maubot.settings = {
|
|
database = "postgresql://maubot@localhost/maubot";
|
|
server.public_url = "https://matrix.${cfg.domainName}";
|
|
};
|
|
services.maubot.plugins = with config.services.maubot.package.plugins; [
|
|
weather
|
|
urban
|
|
media
|
|
reactbot
|
|
reminder
|
|
translate
|
|
rss
|
|
];
|
|
services.maubot.pythonPackages = with pkgs.python3.pkgs; [
|
|
levenshtein
|
|
];
|
|
}
|