nixos/jibri: fix & docs for enable not via meet

This commit is contained in:
Cleeyv 2021-10-11 07:46:08 -07:00 committed by tomberek
parent ec3c9b1306
commit 917c5fae70
2 changed files with 34 additions and 6 deletions

View File

@ -86,7 +86,7 @@ let
in
{
options.services.jibri = with types; {
enable = mkEnableOption "Jitsi BRoadcasting Infrastructure. Currently the only supported way of enabling a jibri instance is with <option>services.jitsi-meet.jibri.enable</option>";
enable = mkEnableOption "Jitsi BRoadcasting Infrastructure. Currently Jibri must be run on a host that is also running <option>services.jitsi-meet.enable</option>, so for most use cases it will be simpler to run <option>services.jitsi-meet.jibri.enable</option>";
config = mkOption {
type = attrs;
default = { };
@ -142,6 +142,34 @@ in
description = ''
XMPP servers to connect to.
'';
example = literalExpression ''
"jitsi-meet" = {
xmppServerHosts = [ "localhost" ];
xmppDomain = config.services.jitsi-meet.hostName;
control.muc = {
domain = "internal.''${config.services.jitsi-meet.hostName}";
roomName = "JibriBrewery";
nickname = "jibri";
};
control.login = {
domain = "auth.''${config.services.jitsi-meet.hostName}";
username = "jibri";
passwordFile = "/var/lib/jitsi-meet/jibri-auth-secret";
};
call.login = {
domain = "recorder.''${config.services.jitsi-meet.hostName}";
username = "recorder";
passwordFile = "/var/lib/jitsi-meet/jibri-recorder-secret";
};
usageTimeout = "0";
disableCertificateVerification = true;
stripFromRoomDomain = "conference.";
};
'';
default = { };
type = attrsOf (submodule ({ name, ... }: {
options = {

View File

@ -52,7 +52,7 @@ in
type = str;
example = "meet.example.org";
description = ''
Hostname of the Jitsi Meet instance.
FQDN of the Jitsi Meet instance.
'';
};
@ -140,9 +140,8 @@ in
description = ''
Whether to enable a Jibri instance and configure it to connect to Prosody.
Although additional configuration is possible with <option>services.jibri</option>, this is
currently not very supported and most users will only want to edit the finalize recordings
script at <option>services.jibri.finalizeScript</option>.
Additional configuration is possible with <option>services.jibri</option>, and
<option>services.jibri.finalizeScript</option> is especially useful.
'';
};
@ -409,7 +408,8 @@ in
bridgeMuc = "jvbbrewery@internal.${cfg.hostName}";
config = mkMerge [{
"org.jitsi.jicofo.ALWAYS_TRUST_MODE_ENABLED" = "true";
} (lib.mkIf cfg.jibri.enable {
#} (lib.mkIf cfg.jibri.enable {
} (lib.mkIf (config.services.jibri.enable || cfg.jibri.enable) {
"org.jitsi.jicofo.jibri.BREWERY" = "JibriBrewery@internal.${cfg.hostName}";
"org.jitsi.jicofo.jibri.PENDING_TIMEOUT" = "90";
})];