tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
nixos/jitsi-meet: updated prosody config
genesis
2 years ago
8224ddea
645bc49f
+96
-13
1 changed file
expand all
collapse all
unified
split
nixos
modules
services
web-apps
jitsi-meet.nix
+96
-13
nixos/modules/services/web-apps/jitsi-meet.nix
···
192
192
roomLocking = false;
193
193
roomDefaultPublicJids = true;
194
194
extraConfig = ''
195
195
+
restrict_room_creation = true
195
196
storage = "memory"
197
197
+
admins = { "focus@auth.${cfg.hostName}" }
196
198
'';
197
199
}
198
200
{
199
199
-
domain = "internal.${cfg.hostName}";
201
201
+
domain = "breakout.${cfg.hostName}";
202
202
+
name = "Jitsi Meet Breakout MUC";
203
203
+
roomLocking = false;
204
204
+
roomDefaultPublicJids = true;
205
205
+
extraConfig = ''
206
206
+
restrict_room_creation = true
207
207
+
storage = "memory"
208
208
+
admins = { "focus@auth.${cfg.hostName}" }
209
209
+
'';
210
210
+
}
211
211
+
{
212
212
+
domain = "internal.auth.${cfg.hostName}";
200
213
name = "Jitsi Meet Videobridge MUC";
214
214
+
roomLocking = false;
215
215
+
roomDefaultPublicJids = true;
201
216
extraConfig = ''
202
217
storage = "memory"
203
218
admins = { "focus@auth.${cfg.hostName}", "jvb@auth.${cfg.hostName}" }
204
219
'';
205
220
#-- muc_room_cache_size = 1000
206
221
}
222
222
+
{
223
223
+
domain = "lobby.${cfg.hostName}";
224
224
+
name = "Jitsi Meet Lobby MUC";
225
225
+
roomLocking = false;
226
226
+
roomDefaultPublicJids = true;
227
227
+
extraConfig = ''
228
228
+
restrict_room_creation = true
229
229
+
storage = "memory"
230
230
+
'';
231
231
+
}
207
232
];
208
208
-
extraModules = [ "pubsub" "smacks" ];
233
233
+
extraModules = [
234
234
+
"pubsub"
235
235
+
"smacks"
236
236
+
"speakerstats"
237
237
+
"external_services"
238
238
+
"conference_duration"
239
239
+
"end_conference"
240
240
+
"muc_lobby_rooms"
241
241
+
"muc_breakout_rooms"
242
242
+
"av_moderation"
243
243
+
"muc_hide_all"
244
244
+
"muc_meeting_id"
245
245
+
"muc_domain_mapper"
246
246
+
"muc_rate_limit"
247
247
+
"limits_exception"
248
248
+
"persistent_lobby"
249
249
+
];
209
250
extraPluginPaths = [ "${pkgs.jitsi-meet-prosody}/share/prosody-plugins" ];
210
210
-
extraConfig = lib.mkMerge [ (mkAfter ''
211
211
-
Component "focus.${cfg.hostName}" "client_proxy"
212
212
-
target_address = "focus@auth.${cfg.hostName}"
251
251
+
extraConfig = lib.mkMerge [
252
252
+
(mkAfter ''
253
253
+
Component "focus.${cfg.hostName}" "client_proxy"
254
254
+
target_address = "focus@auth.${cfg.hostName}"
255
255
+
256
256
+
Component "speakerstats.${cfg.hostName}" "speakerstats_component"
257
257
+
muc_component = "conference.${cfg.hostName}"
258
258
+
259
259
+
Component "conferenceduration.${cfg.hostName}" "conference_duration_component"
260
260
+
muc_component = "conference.${cfg.hostName}"
261
261
+
262
262
+
Component "endconference.${cfg.hostName}" "end_conference"
263
263
+
muc_component = "conference.${cfg.hostName}"
264
264
+
265
265
+
Component "avmoderation.${cfg.hostName}" "av_moderation_component"
266
266
+
muc_component = "conference.${cfg.hostName}"
267
267
+
268
268
+
Component "metadata.${cfg.hostName}" "room_metadata_component"
269
269
+
muc_component = "conference.${cfg.hostName}"
270
270
+
breakout_rooms_component = "breakout.${cfg.hostName}"
213
271
'')
214
272
(mkBefore ''
273
273
+
muc_mapper_domain_base = "${cfg.hostName}"
274
274
+
215
275
cross_domain_websocket = true;
216
276
consider_websocket_secure = true;
277
277
+
278
278
+
unlimited_jids = {
279
279
+
"focus@auth.${cfg.hostName}",
280
280
+
"jvb@auth.${cfg.hostName}"
281
281
+
}
217
282
'')
218
283
];
219
284
virtualHosts.${cfg.hostName} = {
220
285
enabled = true;
221
286
domain = cfg.hostName;
222
287
extraConfig = ''
223
223
-
authentication = "anonymous"
288
288
+
authentication = "jitsi-anonymous"
224
289
c2s_require_encryption = false
225
290
admins = { "focus@auth.${cfg.hostName}" }
226
291
smacks_max_unacked_stanzas = 5
227
292
smacks_hibernation_time = 60
228
293
smacks_max_hibernated_sessions = 1
229
294
smacks_max_old_sessions = 1
295
295
+
296
296
+
av_moderation_component = "avmoderation.${cfg.hostName}"
297
297
+
speakerstats_component = "speakerstats.${cfg.hostName}"
298
298
+
conference_duration_component = "conferenceduration.${cfg.hostName}"
299
299
+
end_conference_component = "endconference.${cfg.hostName}"
300
300
+
301
301
+
c2s_require_encryption = false
302
302
+
lobby_muc = "lobby.${cfg.hostName}"
303
303
+
breakout_rooms_muc = "breakout.${cfg.hostName}"
304
304
+
room_metadata_component = "metadata.${cfg.hostName}"
305
305
+
main_muc = "conference.${cfg.hostName}"
230
306
'';
231
307
ssl = {
232
308
cert = "/var/lib/jitsi-meet/jitsi-meet.crt";
···
237
313
enabled = true;
238
314
domain = "auth.${cfg.hostName}";
239
315
extraConfig = ''
240
240
-
authentication = "internal_plain"
316
316
+
authentication = "internal_hashed"
241
317
'';
242
318
ssl = {
243
319
cert = "/var/lib/jitsi-meet/jitsi-meet.crt";
···
270
346
reloadIfChanged = true;
271
347
};
272
348
273
273
-
users.groups.jitsi-meet = {};
349
349
+
users.groups.jitsi-meet = { };
274
350
systemd.tmpfiles.rules = [
275
351
"d '/var/lib/jitsi-meet' 0750 root jitsi-meet - -"
276
352
];
···
345
421
locations."=/external_api.js" = mkDefault {
346
422
alias = "${pkgs.jitsi-meet}/libs/external_api.min.js";
347
423
};
424
424
+
locations."=/_api/room-info" = {
425
425
+
proxyPass = "http://localhost:5280/room-info";
426
426
+
extraConfig = ''
427
427
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
428
428
+
proxy_set_header Host $host;
429
429
+
'';
430
430
+
};
348
431
locations."=/config.js" = mkDefault {
349
432
alias = overrideJs "${pkgs.jitsi-meet}/config.js" "config" (recursiveUpdate defaultCfg cfg.config) cfg.extraConfig;
350
433
};
···
359
442
virtualHosts.${cfg.hostName} = {
360
443
extraConfig =
361
444
let
362
362
-
templatedJitsiMeet = pkgs.runCommand "templated-jitsi-meet" {} ''
445
445
+
templatedJitsiMeet = pkgs.runCommand "templated-jitsi-meet" { } ''
363
446
cp -R ${pkgs.jitsi-meet}/* .
364
447
for file in *.html **/*.html ; do
365
448
${pkgs.sd}/bin/sd '<!--#include virtual="(.*)" -->' '{{ include "$1" }}' $file
···
396
479
userName = "jvb";
397
480
domain = "auth.${cfg.hostName}";
398
481
passwordFile = "/var/lib/jitsi-meet/videobridge-secret";
399
399
-
mucJids = "jvbbrewery@internal.${cfg.hostName}";
482
482
+
mucJids = "jvbbrewery@internal.auth.${cfg.hostName}";
400
483
disableCertificateVerification = true;
401
484
};
402
485
};
···
409
492
userName = "focus";
410
493
userPasswordFile = "/var/lib/jitsi-meet/jicofo-user-secret";
411
494
componentPasswordFile = "/var/lib/jitsi-meet/jicofo-component-secret";
412
412
-
bridgeMuc = "jvbbrewery@internal.${cfg.hostName}";
495
495
+
bridgeMuc = "jvbbrewery@internal.auth.${cfg.hostName}";
413
496
config = mkMerge [{
414
497
jicofo.xmpp.service.disable-certificate-verification = true;
415
498
jicofo.xmpp.client.disable-certificate-verification = true;
416
499
#} (lib.mkIf cfg.jibri.enable {
417
500
} (lib.mkIf (config.services.jibri.enable || cfg.jibri.enable) {
418
501
jicofo.jibri = {
419
419
-
brewery-jid = "JibriBrewery@internal.${cfg.hostName}";
502
502
+
brewery-jid = "JibriBrewery@internal.auth.${cfg.hostName}";
420
503
pending-timeout = "90";
421
504
};
422
505
})];
···
430
513
xmppDomain = cfg.hostName;
431
514
432
515
control.muc = {
433
433
-
domain = "internal.${cfg.hostName}";
516
516
+
domain = "internal.auth.${cfg.hostName}";
434
517
roomName = "JibriBrewery";
435
518
nickname = "jibri";
436
519
};