2022-02-04 01:08:05 +02:00
|
|
|
{ config, lib, hosts, tools, ... }:
|
|
|
|
let
|
|
|
|
host = hosts.${config.networking.hostName};
|
|
|
|
inherit (host) interfaces;
|
|
|
|
|
|
|
|
isNAT = interfaces.primary ? addrPublic;
|
|
|
|
in
|
2021-10-16 21:24:57 +03:00
|
|
|
{
|
|
|
|
services.jitsi-meet = {
|
|
|
|
enable = true;
|
|
|
|
hostName = "meet.${tools.meta.domain}";
|
|
|
|
nginx.enable = true;
|
|
|
|
jicofo.enable = true;
|
|
|
|
videobridge.enable = true;
|
|
|
|
prosody.enable = true;
|
|
|
|
config.p2p.enabled = false;
|
|
|
|
};
|
2022-03-18 20:24:14 +02:00
|
|
|
services.jitsi-videobridge = {
|
|
|
|
openFirewall = true;
|
2022-05-15 01:35:02 +03:00
|
|
|
apis = [ "colibri" "rest" ];
|
|
|
|
config.videobridge = {
|
|
|
|
ice = {
|
|
|
|
tcp.port = 7777;
|
|
|
|
};
|
|
|
|
stats.transports = [
|
|
|
|
{ type = "muc"; }
|
|
|
|
{ type = "colibri"; }
|
|
|
|
];
|
2022-03-18 20:24:49 +02:00
|
|
|
};
|
2022-03-18 20:24:14 +02:00
|
|
|
nat = lib.optionalAttrs isNAT {
|
|
|
|
localAddress = interfaces.primary.addr;
|
|
|
|
publicAddress = interfaces.primary.addrPublic;
|
|
|
|
};
|
|
|
|
};
|
2021-10-16 21:24:57 +03:00
|
|
|
services.nginx.virtualHosts."meet.${tools.meta.domain}" = {
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
locations."=/images/watermark.svg" = {
|
|
|
|
return = "200";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
systemd.services = lib.genAttrs [ "jicofo" "jitsi-meet-init-secrets" "jitsi-videobridge2" "prosody" ] (_: {
|
|
|
|
serviceConfig = {
|
|
|
|
Slice = "communications.slice";
|
|
|
|
};
|
|
|
|
});
|
2021-12-02 22:45:05 +02:00
|
|
|
boot.kernel.sysctl."net.core.rmem_max" = lib.mkForce 10485760;
|
2021-10-16 21:24:57 +03:00
|
|
|
}
|