nix-config/hosts/nixedo/modules/jitsi.nix
Oliver Davies 51b91cbf2b
All checks were successful
/ check (push) Successful in 1m36s
Add jitsi-meet (work in progress)
2025-05-14 08:21:57 +01:00

41 lines
821 B
Nix

{ config, lib, ... }:
let
cfg = config.homelab.services.${service};
homelab = config.homelab;
service = "jitsi";
inherit (lib) mkEnableOption mkOption types;
in
{
options.homelab.services.${service} = {
enable = mkEnableOption "Enable ${service}";
url = mkOption {
default = "meet.${homelab.domain}";
type = types.str;
};
};
config = lib.mkIf cfg.enable {
services = {
jitsi-meet = {
enable = false;
hostName = cfg.url;
secureDomain.enable = true;
};
nginx.virtualHosts.${cfg.url} = {
enableACME = false;
forceSSL = false;
};
cloudflared.tunnels.${homelab.cloudflared.tunnelId}.ingress = {
# TODO: is this the correct port?
${cfg.url} = "http://localhost:5280";
};
};
};
}