Some checks failed
Cache: Publish Nix / Publish Nix Cache (push) Waiting to run
Build Rust / Cargo Test (push) Successful in 4m14s
Build Site / Next.js Build (push) Failing after 6s
Infra: OpenTofu / OpenTofu (grafana) (push) Successful in 5s
Lint Governance / BEP Metadata (push) Successful in 0s
Build: Android / Android Rust Core Stub (push) Failing after 23s
45 lines
1.1 KiB
Nix
45 lines
1.1 KiB
Nix
{ config, lib, ... }:
|
|
|
|
let
|
|
cfg = config.services.burrow.jitsi;
|
|
in
|
|
{
|
|
options.services.burrow.jitsi = {
|
|
enable = lib.mkEnableOption "the Burrow Jitsi Meet deployment";
|
|
|
|
domain = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = "meet.burrow.net";
|
|
description = "Public Jitsi Meet domain.";
|
|
};
|
|
|
|
videobridgeUdpPort = lib.mkOption {
|
|
type = lib.types.port;
|
|
default = 10000;
|
|
description = "Public UDP port used by Jitsi Videobridge media traffic.";
|
|
};
|
|
|
|
enableHttpProxy = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = true;
|
|
description = "Expose Jitsi through the repo-owned Caddy reverse proxy.";
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
services.jitsi-meet = {
|
|
enable = true;
|
|
hostName = cfg.domain;
|
|
nginx.enable = false;
|
|
};
|
|
|
|
services.jitsi-videobridge.openFirewall = true;
|
|
|
|
networking.firewall.allowedUDPPorts = [ cfg.videobridgeUdpPort ];
|
|
|
|
services.caddy.virtualHosts."${cfg.domain}".extraConfig = lib.mkIf cfg.enableHttpProxy ''
|
|
encode gzip zstd
|
|
reverse_proxy 127.0.0.1:5280
|
|
'';
|
|
};
|
|
}
|