8 cfg = config.services.jicofo;
10 format = pkgs.formats.hocon { };
12 configFile = format.generate "jicofo.conf" cfg.config;
15 options.services.jicofo = with lib.types; {
16 enable = lib.mkEnableOption "Jitsi Conference Focus - component of Jitsi Meet";
18 xmppHost = lib.mkOption {
20 example = "localhost";
22 Hostname of the XMPP server to connect to.
26 xmppDomain = lib.mkOption {
28 example = "meet.example.org";
30 Domain name of the XMMP server to which to connect as a component.
32 If null, {option}`xmppHost` is used.
36 componentPasswordFile = lib.mkOption {
38 example = "/run/keys/jicofo-component";
40 Path to file containing component secret.
44 userName = lib.mkOption {
48 User part of the JID for XMPP user connection.
52 userDomain = lib.mkOption {
54 example = "auth.meet.example.org";
56 Domain part of the JID for XMPP user connection.
60 userPasswordFile = lib.mkOption {
62 example = "/run/keys/jicofo-user";
64 Path to file containing password for XMPP user connection.
68 bridgeMuc = lib.mkOption {
70 example = "jvbbrewery@internal.meet.example.org";
72 JID of the internal MUC used to communicate with Videobridges.
76 config = lib.mkOption {
79 example = lib.literalExpression ''
81 jicofo.bridge.max-bridge-participants = 42;
85 Contents of the {file}`jicofo.conf` configuration file.
90 config = lib.mkIf cfg.enable {
91 services.jicofo.config = {
93 bridge.brewery-jid = cfg.bridgeMuc;
96 hostname = cfg.xmppHost;
97 username = cfg.userName;
98 domain = cfg.userDomain;
99 password = format.lib.mkSubstitution "JICOFO_AUTH_PASS";
100 xmpp-domain = if cfg.xmppDomain == null then cfg.xmppHost else cfg.xmppDomain;
107 users.groups.jitsi-meet = { };
109 systemd.services.jicofo =
112 "-Dnet.java.sip.communicator.SC_HOME_DIR_LOCATION" = "/etc/jitsi";
113 "-Dnet.java.sip.communicator.SC_HOME_DIR_NAME" = "jicofo";
114 "-Djava.util.logging.config.file" = "/etc/jitsi/jicofo/logging.properties";
115 "-Dconfig.file" = configFile;
119 description = "JItsi COnference FOcus";
120 wantedBy = [ "multi-user.target" ];
121 after = [ "network.target" ];
126 environment.JAVA_SYS_PROPS = lib.concatStringsSep " " (
127 lib.mapAttrsToList (k: v: "${k}=${toString v}") jicofoProps
131 export JICOFO_AUTH_PASS="$(<${cfg.userPasswordFile})"
132 exec "${pkgs.jicofo}/bin/jicofo"
140 Group = "jitsi-meet";
142 CapabilityBoundingSet = "";
143 NoNewPrivileges = true;
144 ProtectSystem = "strict";
147 PrivateDevices = true;
148 ProtectHostname = true;
149 ProtectKernelTunables = true;
150 ProtectKernelModules = true;
151 ProtectControlGroups = true;
152 RestrictAddressFamilies = [
157 RestrictNamespaces = true;
158 LockPersonality = true;
159 RestrictRealtime = true;
160 RestrictSUIDSGID = true;
164 environment.etc."jitsi/jicofo/sip-communicator.properties".text = "";
165 environment.etc."jitsi/jicofo/logging.properties".source =
166 lib.mkDefault "${pkgs.jicofo}/etc/jitsi/jicofo/logging.properties-journal";
169 meta.maintainers = lib.teams.jitsi.members;