2023-12-04 11:43:06 +00:00
|
|
|
{ config, lib, ... }:
|
2023-12-18 15:02:54 +00:00
|
|
|
let
|
|
|
|
domain = config.selfprivacy.domain;
|
2024-02-15 09:56:12 +00:00
|
|
|
cfg = config.selfprivacy.modules.jitsi-meet;
|
2023-12-18 15:02:54 +00:00
|
|
|
in
|
2023-12-04 11:43:06 +00:00
|
|
|
{
|
|
|
|
options.selfprivacy.modules.jitsi-meet = {
|
|
|
|
enable = lib.mkOption {
|
|
|
|
default = false;
|
2023-12-28 08:54:59 +00:00
|
|
|
type = lib.types.bool;
|
2023-12-04 11:43:06 +00:00
|
|
|
};
|
2024-02-15 09:56:12 +00:00
|
|
|
subdomain = lib.mkOption {
|
|
|
|
default = "meet";
|
|
|
|
type = lib.types.strMatching "[A-Za-z0-9][A-Za-z0-9\-]{0,61}[A-Za-z0-9]";
|
|
|
|
};
|
2024-06-30 17:47:08 +00:00
|
|
|
appName = lib.mkOption {
|
|
|
|
default = "Jitsi Meet";
|
|
|
|
type = lib.types.str;
|
|
|
|
};
|
2023-12-04 11:43:06 +00:00
|
|
|
};
|
|
|
|
|
2024-02-15 09:56:12 +00:00
|
|
|
config = lib.mkIf cfg.enable {
|
2023-12-04 11:43:06 +00:00
|
|
|
services.jitsi-meet = {
|
|
|
|
enable = true;
|
2024-02-15 09:56:12 +00:00
|
|
|
hostName = "${cfg.subdomain}.${domain}";
|
2023-12-04 11:43:06 +00:00
|
|
|
nginx.enable = true;
|
|
|
|
interfaceConfig = {
|
|
|
|
SHOW_JITSI_WATERMARK = false;
|
|
|
|
SHOW_WATERMARK_FOR_GUESTS = false;
|
2024-06-30 17:47:08 +00:00
|
|
|
APP_NAME = cfg.appName;
|
|
|
|
};
|
|
|
|
config = {
|
|
|
|
prejoinConfig = {
|
|
|
|
enabled = true;
|
|
|
|
};
|
2023-12-04 11:43:06 +00:00
|
|
|
};
|
|
|
|
};
|
2024-02-15 09:56:12 +00:00
|
|
|
services.nginx.virtualHosts."${cfg.subdomain}.${domain}" = {
|
2023-12-18 15:02:54 +00:00
|
|
|
forceSSL = true;
|
2023-12-19 19:46:42 +00:00
|
|
|
useACMEHost = domain;
|
|
|
|
enableACME = false;
|
2023-12-18 15:02:54 +00:00
|
|
|
};
|
2024-07-30 16:19:06 +00:00
|
|
|
systemd = {
|
|
|
|
services = {
|
|
|
|
jicofo.serviceConfig.Slice = "jitsi_meet.slice";
|
|
|
|
jitsi-videobridge2.serviceConfig.Slice = "jitsi_meet.slice";
|
|
|
|
prosody.serviceConfig.Slice = "jitsi_meet.slice";
|
|
|
|
};
|
|
|
|
slices.jitsi_meet = {
|
|
|
|
description = "Jitsi Meet service slice";
|
|
|
|
};
|
|
|
|
};
|
2023-12-04 11:43:06 +00:00
|
|
|
};
|
|
|
|
}
|