nixos/jitsi-videobridge: add apis option (#112960)

The `--apis=` command line parameter passed to Jitsi Videobridge is
required to monitor a Jitsi Meet instance for example via the prometheus
exporter [jitsiexporter](https://git.xsfx.dev/prometheus/jitsiexporter).

Milan 3b77e7c9 28adb5b0

Changed files
+11 -1
nixos
modules
services
+11 -1
nixos/modules/services/networking/jitsi-videobridge.nix
···
Whether to open ports in the firewall for the videobridge.
'';
};
+
+
apis = mkOption {
+
type = with types; listOf str;
+
description = ''
+
What is passed as --apis= parameter. If this is empty, "none" is passed.
+
Needed for monitoring jitsi.
+
'';
+
default = [];
+
example = literalExample "[ \"colibri\" \"rest\" ]";
+
};
};
config = mkIf cfg.enable {
···
"export ${toVarName name}=$(cat ${xmppConfig.passwordFile})\n"
) cfg.xmppConfigs))
+ ''
-
${pkgs.jitsi-videobridge}/bin/jitsi-videobridge --apis=none
+
${pkgs.jitsi-videobridge}/bin/jitsi-videobridge --apis=${if (cfg.apis == []) then "none" else concatStringsSep "," cfg.apis}
'';
serviceConfig = {