From 3b77e7c9678711543b3f323316d46ea8e01c6cb0 Mon Sep 17 00:00:00 2001 From: Milan Date: Sat, 13 Feb 2021 15:04:58 +0100 Subject: [PATCH] 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). --- .../services/networking/jitsi-videobridge.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/jitsi-videobridge.nix b/nixos/modules/services/networking/jitsi-videobridge.nix index 5482e997a40..80f35d56e2d 100644 --- a/nixos/modules/services/networking/jitsi-videobridge.nix +++ b/nixos/modules/services/networking/jitsi-videobridge.nix @@ -191,6 +191,16 @@ in 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 { @@ -221,7 +231,7 @@ in "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 = {