dotfiles/system/hosts/server/maubot.nix

36 lines
811 B
Nix
Raw Permalink Normal View History

2023-05-11 05:33:08 +07:00
{ config
, lib
, pkgs
2023-05-11 05:33:08 +07:00
, ... }:
let
cfg = config.server;
in {
2023-11-29 01:52:15 +07:00
services.nginx.virtualHosts."matrix.${cfg.domainName}".locations = let
inherit (config.services.maubot) settings;
in {
2024-09-13 23:01:22 +07:00
"^~ /_matrix/maubot/" = {
2023-11-29 01:52:15 +07:00
proxyPass = "http://${lib.quoteListenAddr settings.server.hostname}:${toString settings.server.port}";
2023-05-11 05:33:08 +07:00
proxyWebsockets = true;
};
};
services.maubot.enable = true;
services.maubot.settings = {
database = "postgresql://maubot@localhost/maubot";
server.public_url = "https://matrix.${cfg.domainName}";
2023-05-11 05:33:08 +07:00
};
services.maubot.plugins = with config.services.maubot.package.plugins; [
weather
urban
media
reactbot
reminder
translate
rss
];
2023-11-21 04:46:52 +07:00
services.maubot.pythonPackages = with pkgs.python3.pkgs; [
levenshtein
2024-06-06 23:20:08 +07:00
pillow
2023-11-21 04:46:52 +07:00
];
2023-05-11 05:33:08 +07:00
}