+1
-1
nixos/doc/manual/release-notes/rl-2405.section.md
+1
-1
nixos/doc/manual/release-notes/rl-2405.section.md
···<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->+- [maubot](https://github.com/maubot/maubot), a plugin-based Matrix bot framework. Available as [services.maubot](#opt-services.maubot.enable).
+1
nixos/modules/module-list.nix
+1
nixos/modules/module-list.nix
···
+103
nixos/modules/services/matrix/maubot.md
+103
nixos/modules/services/matrix/maubot.md
···
+459
nixos/modules/services/matrix/maubot.nix
+459
nixos/modules/services/matrix/maubot.nix
···+If it already exists, **it must contain `server.unshared_secret`** which is used for signing API keys.+Whether maubot should write updated config into `extraConfigFile`. **This will make your Nix module settings have no effect besides the initial config, as extraConfigFile takes precedence over NixOS settings!**+[example configuration](https://github.com/maubot/maubot/blob/master/maubot/example-config.yaml)+Separate database URL for the crypto database. By default, the regular database is also used for crypto.+The directories from which plugins should be loaded. Duplicate plugin IDs will be moved to the trash.+The directory where old plugin versions and conflicting plugins should be moved. Set to null to delete files immediately.+defaultText = literalExpression ''if isPostgresql config.services.maubot.settings.database then "default" else null'';+The connection URL for plugin database. See [example config](https://github.com/maubot/maubot/blob/master/maubot/example-config.yaml) for exact format.+defaultText = literalExpression ''"http://''${config.services.maubot.settings.server.hostname}:''${toString config.services.maubot.settings.server.port}"'';+Known homeservers. This is required for the `mbc auth` command and also allows more convenient access from the management UI.+List of administrator users. Plaintext passwords will be bcrypted on startup. Set empty password+to prevent normal login. Root is a special user that can't have a password and will always exist.+documentation](https://docs.python.org/3.6/library/logging.config.html#configuration-dictionary-schema)+warnings = lib.optional (builtins.any (x: x.username != x.database) parsedLocalPostgresDBs) ''+The Maubot database username doesn't match the database name! This means the user won't be automatically+granted ownership of the database. Consider changing either the username or the database name.+Putting database passwords in your Nix config makes them world-readable. To securely put passwords+in your Maubot config, change /var/lib/maubot/config.yaml after running Maubot at least once as+Cannot deploy maubot with a configuration for a local postgresql database and a missing postgresql service.+after = [ "network.target" ] ++ wants ++ lib.optional hasLocalPostgresDB "postgresql.service";+wants = lib.optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit;+echo " unshared_secret: $(head -c40 /dev/random | base32 | ${pkgs.gawk}/bin/awk '{print tolower($0)}')" > "${cfg.extraConfigFile}"+ExecStart = "${finalPackage}/bin/maubot --config ${cfg.extraConfigFile}" + lib.optionalString (!cfg.configMutable) " --no-update";
-13
pkgs/tools/networking/maubot/allow-building-plugins-from-nix-store.patch
-13
pkgs/tools/networking/maubot/allow-building-plugins-from-nix-store.patch
···
+29
-10
pkgs/tools/networking/maubot/default.nix
+29
-10
pkgs/tools/networking/maubot/default.nix
······url = "https://github.com/maubot/maubot/commit/283f0a3ed5dfae13062b6f0fd153fbdc477f4381.patch";···
+68
pkgs/tools/networking/maubot/plugins/default.nix
+68
pkgs/tools/networking/maubot/plugins/default.nix
···+[ -e base-config.yaml ] || (echo "base-config.yaml doesn't exist, can't override it" && exit 1)
+2225
pkgs/tools/networking/maubot/plugins/generated.json
+2225
pkgs/tools/networking/maubot/plugins/generated.json
···+"description": "A plugin for the maubot bot framework implementing URL downloads in matrix rooms.",+"description": "A plugin that minimally tracks user activity within a space. Useful for kicking inactive users from a private community.",+"description": "A bot that recives monitoring alerts via alertmanager and forwards them to a matrix room.",+"description": "An anime/manga bot for Matrix. Search anime, manga (manhwa/manhua), and light novels from Anilist. See series info, status, and episodes/chapters.",+"description": "A bot that sends automated replies when you're away, and shows you a summary of missed messages when you come back.",+"description": "Allow your maubot instance to return queries from Google(TM) Bard(TM) pseudoAI",+"description": "Chat with characters from [character.ai](https://character.ai/) in your Matrix rooms! Very customizable.",+"description": "ChatGPT plugin for maubot. Multi-user aware for use in group rooms! Customize your prompts to \"train\" your assistant contextually.",+"description": "A plugin that creates new rooms and automatically sets them to be part of a private Matrix Space.",+"description": "A bot that echoes pings and other stuff.\n\nSee [#ping:maunium.net](https://matrix.to/#/#ping:maunium.net) for a room\nwith lots of echo bots.\n",+"description": "Superior gif responses. Save your own library of image or video responses.\nAllows fallback behavior to Giphy or Tenor, optionally saves quotes from\nusers for comedic effect or to be used as an FAQ bot!\n",+"description": "A bot receiving webhooks from [Home Assistant](https://github.com/home-assistant).",+"description": "A bot which sends converted HEIF into JPEG. Works in encrypted and unencrypted rooms.",+"description": "A plugin to add a `!help` command to maubot. Returns all built-in help commands for all plugins loaded in the client instance.",+"description": "A bot to generate invitation tokens from [matrix-registration](https://github.com/ZerataX/matrix-registration).",+"description": "A Japanese dictionary Matrix bot for searching and translating Japanese vocabulary (Hiragana, Katakana, Kanji, Romaji). Searches Jisho using Jisho API.",+"description": "A plugin that restricts who can convince your bot to join new rooms to certain users.",+"description": "A plugin to sync users from Microsoft Azure AD and LDAP into matrix rooms. (Membership, Power-Levels)",+"description": "A Maubot to transcribe audio messages in matrix rooms using local open-source libraries",+"description": "A bot that will reply to a message that contains imperial units and replace them with metric units.",+"description": "A bot for subscribing to [ntfy](https://ntfy.sh) topics and posting messages to Matrix.",+"description": "A bot that immediately redacts any posted file (except for whitelisted types).",+"description": "Create reminders, recurring reminders, and agenda items. A maubot port of [matrix-reminder-bot](https://github.com/anoadragon453/matrix-reminder-bot/tree/master) combined with [maubot/reminder](https://github.com/maubot/reminder)",+"description": "Have the bot send a message as custom HTML. Test and preview formatted HTML body in Matrix.",+"description": "A bot that that downloads content from various social media websites given a link.",+"description": "A bot that condescendingly corrects a user when they enter an r/subreddit without providing a link to that subreddit.",+"description": "Get the time in specific cities. Check timezones. !timein New York (Python 3.9+) (Python <3.9 requires pytz, fuzzywuzzy)",+"description": "A bot that fetches definitions from [Urban Dictionary](https://www.urbandictionary.com/).",+"description": "Add URL preview embeds to Matrix! A bot that responds to links with a link preview embed, using Matrix API to fetch meta tags. Supports fetching JSON previews.",+"description": "A bot to get the weather from wttr.in and return a single line of text for the location specified.",+"description": "A plugin that greets new people with a configurable message when they join a room.",+"description": "A bot that allows requesting information from [WolframAlpha](https://www.wolframalpha.com/).",
+74
pkgs/tools/networking/maubot/plugins/generated.nix
+74
pkgs/tools/networking/maubot/plugins/generated.nix
···+(map (x: lib.nameValuePair x.spdxId x) (builtins.filter (x: x?spdxId) (builtins.attrValues lib.licenses)));
+200
pkgs/tools/networking/maubot/plugins/update.py
+200
pkgs/tools/networking/maubot/plugins/update.py
···+#!nix-shell -i python3 -p git nurl "(python3.withPackages (ps: with ps; [ toml gitpython requests ruamel-yaml ]))"+name, repourl, license, desc = data['name'], data['repo'], data['license'], data['description']+elif HOSTNAMES.get(domain, 'gitea' if 'gitea.' in domain or 'forgejo.' in domain else None) == 'gitea':+raise ValueError(f'Is {domain} Gitea or Gitlab, or something else? Please specify in the Python script!')+print(f"Warning: licenses for {repourl} don't match! {ret['manifest']['license']} != {license}")+git.Repo.clone_from('https://github.com/maubot/plugins.maubot.xyz', os.path.join(cache_path, '_repo'))
+70
pkgs/tools/networking/maubot/wrapper.nix
+70
pkgs/tools/networking/maubot/wrapper.nix
···+pythonPath = lib.optional (baseConfig == null) unwrapped ++ pythonPackages python3.pkgs ++ extraPythonPackages;+substituteAll ${(formats.yaml { }).generate "example-config.yaml" (lib.recursiveUpdate baseConfig {+# https://github.com/maubot/maubot/blob/75879cfb9370aade6fa0e84e1dde47222625139a/maubot/server.py#L106+wrapPythonProgramsIn "$out/bin" "${lib.optionalString (baseConfig != null) "$out "}$pythonPath"