From 51b91cbf2b5684e01cd78935aae97fe409b0f2e1 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Wed, 14 May 2025 08:21:57 +0100 Subject: [PATCH] Add jitsi-meet (work in progress) --- hosts/nixedo/configuration.nix | 5 ++++ hosts/nixedo/homelab.nix | 1 + hosts/nixedo/modules/default.nix | 1 + hosts/nixedo/modules/jitsi.nix | 41 ++++++++++++++++++++++++++++++++ 4 files changed, 48 insertions(+) create mode 100644 hosts/nixedo/modules/jitsi.nix diff --git a/hosts/nixedo/configuration.nix b/hosts/nixedo/configuration.nix index 880239e4..c548733f 100644 --- a/hosts/nixedo/configuration.nix +++ b/hosts/nixedo/configuration.nix @@ -21,6 +21,11 @@ cli.podman.enable = true; desktop.dconf.enable = true; + # TODO: why didn't it work when adding this to jitsi.nix? + nixpkgs.config.permittedInsecurePackages = [ + "jitsi-meet-1.0.8043" + ]; + services.logind.lidSwitchExternalPower = "ignore"; boot.loader = { diff --git a/hosts/nixedo/homelab.nix b/hosts/nixedo/homelab.nix index fb9b0292..f6004863 100644 --- a/hosts/nixedo/homelab.nix +++ b/hosts/nixedo/homelab.nix @@ -14,6 +14,7 @@ homepage-dashboard.enable = true; immich.enable = true; jellyfin.enable = true; + jitsi.enable = true; paperless.enable = true; peertube.enable = true; tubearchivist.enable = true; diff --git a/hosts/nixedo/modules/default.nix b/hosts/nixedo/modules/default.nix index aaef0087..20a9d6cf 100644 --- a/hosts/nixedo/modules/default.nix +++ b/hosts/nixedo/modules/default.nix @@ -26,6 +26,7 @@ with lib; ./home-assistant.nix ./immich.nix ./jellyfin.nix + ./jitsi.nix ./nginx ./paperless.nix ./peertube.nix diff --git a/hosts/nixedo/modules/jitsi.nix b/hosts/nixedo/modules/jitsi.nix new file mode 100644 index 00000000..fbe216e3 --- /dev/null +++ b/hosts/nixedo/modules/jitsi.nix @@ -0,0 +1,41 @@ +{ 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"; + }; + }; + }; +}