diff options
author | genesis <camillemondon@free.fr> | 2023-04-22 10:18:28 +0200 |
---|---|---|
committer | genesis <camillemondon@free.fr> | 2023-05-02 11:45:10 +0200 |
commit | 84ab09c3b12ce4691b8ab5a2c48b8a8801f1d72a (patch) | |
tree | bb12c07623bfa505ee7dc824d1d0343c2791dc72 /nixos/modules | |
parent | 2465ddb85b90d1f06e888dcc3473aeaae13cbd5f (diff) | |
download | nixpkgs-84ab09c3b12ce4691b8ab5a2c48b8a8801f1d72a.tar nixpkgs-84ab09c3b12ce4691b8ab5a2c48b8a8801f1d72a.tar.gz nixpkgs-84ab09c3b12ce4691b8ab5a2c48b8a8801f1d72a.tar.bz2 nixpkgs-84ab09c3b12ce4691b8ab5a2c48b8a8801f1d72a.tar.lz nixpkgs-84ab09c3b12ce4691b8ab5a2c48b8a8801f1d72a.tar.xz nixpkgs-84ab09c3b12ce4691b8ab5a2c48b8a8801f1d72a.tar.zst nixpkgs-84ab09c3b12ce4691b8ab5a2c48b8a8801f1d72a.zip |
nixos/jitsi-meet: support Excalidraw whiteboard
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/services/web-apps/jitsi-meet.nix | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/nixos/modules/services/web-apps/jitsi-meet.nix b/nixos/modules/services/web-apps/jitsi-meet.nix index d1288aaba27..6f60b9d057a 100644 --- a/nixos/modules/services/web-apps/jitsi-meet.nix +++ b/nixos/modules/services/web-apps/jitsi-meet.nix @@ -169,6 +169,13 @@ in off if you want to configure it manually. ''; }; + + excalidraw.enable = mkEnableOption (lib.mdDoc "Excalidraw collaboration backend for Jitsi"); + excalidraw.port = mkOption { + type = types.port; + default = 3002; + description = lib.mdDoc ''The port which the Excalidraw backend for Jitsi should listen to.''; + }; }; config = mkIf cfg.enable { @@ -246,6 +253,7 @@ in "muc_rate_limit" "limits_exception" "persistent_lobby" + "room_metadata" ]; extraPluginPaths = [ "${pkgs.jitsi-meet-prosody}/share/prosody-plugins" ]; extraConfig = lib.mkMerge [ @@ -393,6 +401,20 @@ in ''; }; + systemd.services.jitsi-excalidraw = mkIf cfg.excalidraw.enable { + description = "Excalidraw collaboration backend for Jitsi"; + after = [ "network.target" ]; + wantedBy = [ "multi-user.target" ]; + environment.PORT = toString cfg.excalidraw.port; + + serviceConfig = { + Type = "simple"; + ExecStart = "${pkgs.jitsi-excalidraw}/bin/jitsi-excalidraw-backend"; + Restart = "on-failure"; + Group = "jitsi-meet"; + }; + }; + services.nginx = mkIf cfg.nginx.enable { enable = mkDefault true; virtualHosts.${cfg.hostName} = { @@ -434,6 +456,10 @@ in locations."=/interface_config.js" = mkDefault { alias = overrideJs "${pkgs.jitsi-meet}/interface_config.js" "interfaceConfig" cfg.interfaceConfig ""; }; + locations."/socket.io/" = mkIf cfg.excalidraw.enable { + proxyPass = "http://127.0.0.1:${toString cfg.excalidraw.port}"; + proxyWebsockets = true; + }; }; }; @@ -473,6 +499,13 @@ in }; }; + services.jitsi-meet.config = mkIf cfg.excalidraw.enable { + whiteboard = { + enabled = true; + collabServerBaseUrl = "https://${cfg.hostName}"; + }; + }; + services.jitsi-videobridge = mkIf cfg.videobridge.enable { enable = true; xmppConfigs."localhost" = { |