diff --git a/nixos/modules/services/web-apps/jitsi-meet.nix b/nixos/modules/services/web-apps/jitsi-meet.nix index be0b5b94fb26..8ad92706b064 100644 --- a/nixos/modules/services/web-apps/jitsi-meet.nix +++ b/nixos/modules/services/web-apps/jitsi-meet.nix @@ -253,9 +253,20 @@ in ''; }; }; - systemd.services.prosody.serviceConfig = mkIf cfg.prosody.enable { - EnvironmentFile = [ "/var/lib/jitsi-meet/secrets-env" ]; - SupplementaryGroups = [ "jitsi-meet" ]; + systemd.services.prosody = mkIf cfg.prosody.enable { + preStart = let + videobridgeSecret = if cfg.videobridge.passwordFile != null then cfg.videobridge.passwordFile else "/var/lib/jitsi-meet/videobridge-secret"; + in '' + ${config.services.prosody.package}/bin/prosodyctl register focus auth.${cfg.hostName} "$(cat /var/lib/jitsi-meet/jicofo-user-secret)" + ${config.services.prosody.package}/bin/prosodyctl register jvb auth.${cfg.hostName} "$(cat ${videobridgeSecret})" + ${config.services.prosody.package}/bin/prosodyctl mod_roster_command subscribe focus.${cfg.hostName} focus@auth.${cfg.hostName} + ${config.services.prosody.package}/bin/prosodyctl register jibri auth.${cfg.hostName} "$(cat /var/lib/jitsi-meet/jibri-auth-secret)" + ${config.services.prosody.package}/bin/prosodyctl register recorder recorder.${cfg.hostName} "$(cat /var/lib/jitsi-meet/jibri-recorder-secret)" + ''; + serviceConfig = { + EnvironmentFile = [ "/var/lib/jitsi-meet/secrets-env" ]; + SupplementaryGroups = [ "jitsi-meet" ]; + }; }; users.groups.jitsi-meet = {}; @@ -266,14 +277,12 @@ in systemd.services.jitsi-meet-init-secrets = { wantedBy = [ "multi-user.target" ]; before = [ "jicofo.service" "jitsi-videobridge2.service" ] ++ (optional cfg.prosody.enable "prosody.service"); - path = [ config.services.prosody.package ]; serviceConfig = { Type = "oneshot"; }; script = let secrets = [ "jicofo-component-secret" "jicofo-user-secret" "jibri-auth-secret" "jibri-recorder-secret" ] ++ (optional (cfg.videobridge.passwordFile == null) "videobridge-secret"); - videobridgeSecret = if cfg.videobridge.passwordFile != null then cfg.videobridge.passwordFile else "/var/lib/jitsi-meet/videobridge-secret"; in '' cd /var/lib/jitsi-meet @@ -291,12 +300,6 @@ in chmod 640 secrets-env '' + optionalString cfg.prosody.enable '' - prosodyctl register focus auth.${cfg.hostName} "$(cat /var/lib/jitsi-meet/jicofo-user-secret)" - prosodyctl register jvb auth.${cfg.hostName} "$(cat ${videobridgeSecret})" - prosodyctl mod_roster_command subscribe focus.${cfg.hostName} focus@auth.${cfg.hostName} - prosodyctl register jibri auth.${cfg.hostName} "$(cat /var/lib/jitsi-meet/jibri-auth-secret)" - prosodyctl register recorder recorder.${cfg.hostName} "$(cat /var/lib/jitsi-meet/jibri-recorder-secret)" - # generate self-signed certificates if [ ! -f /var/lib/jitsi-meet.crt ]; then ${getBin pkgs.openssl}/bin/openssl req \ diff --git a/nixos/tests/jitsi-meet.nix b/nixos/tests/jitsi-meet.nix index 41d53bc73800..c39cd19e1f0a 100644 --- a/nixos/tests/jitsi-meet.nix +++ b/nixos/tests/jitsi-meet.nix @@ -33,9 +33,6 @@ import ./make-test-python.nix ({ pkgs, ... }: { server.wait_for_unit("nginx.service") server.wait_for_unit("prosody.service") - server.wait_until_succeeds( - "journalctl -b -u jitsi-videobridge2 -o cat | grep -q 'Performed a successful health check'" - ) server.wait_until_succeeds( "journalctl -b -u prosody -o cat | grep -q 'Authenticated as focus@auth.server'" ) diff --git a/pkgs/misc/jitsi-meet-prosody/default.nix b/pkgs/misc/jitsi-meet-prosody/default.nix index 4ce79f3b16c2..66f2cdac3cc1 100644 --- a/pkgs/misc/jitsi-meet-prosody/default.nix +++ b/pkgs/misc/jitsi-meet-prosody/default.nix @@ -2,10 +2,10 @@ stdenv.mkDerivation rec { pname = "jitsi-meet-prosody"; - version = "1.0.5675"; + version = "1.0.6260"; src = fetchurl { url = "https://download.jitsi.org/stable/${pname}_${version}-1_all.deb"; - sha256 = "FrafgJcNF3xv985JJ+xOWPtJZFeElIAaIXWdcgheru0="; + sha256 = "ZUfyEYAU4YEYXBoM+tEZ6SAhqlNcsmxnKw8WEv0gy7M="; }; dontBuild = true; diff --git a/pkgs/servers/jicofo/default.nix b/pkgs/servers/jicofo/default.nix index 71a087afcd93..916e72c90a38 100644 --- a/pkgs/servers/jicofo/default.nix +++ b/pkgs/servers/jicofo/default.nix @@ -2,10 +2,10 @@ let pname = "jicofo"; - version = "1.0-832"; + version = "1.0-900"; src = fetchurl { url = "https://download.jitsi.org/stable/${pname}_${version}-1_all.deb"; - sha256 = "ZSzxD4RCsIkNtB4agBRZkzbJOi6ttzlc4Qw5n0t5syc="; + sha256 = "tAuWhu1DdasOuLIz9/Ox1n1XcFWm5qnTVr6FpdKpwbE="; }; in stdenv.mkDerivation { diff --git a/pkgs/servers/jitsi-videobridge/default.nix b/pkgs/servers/jitsi-videobridge/default.nix index a7a6667d6bfa..39629639ad81 100644 --- a/pkgs/servers/jitsi-videobridge/default.nix +++ b/pkgs/servers/jitsi-videobridge/default.nix @@ -2,10 +2,10 @@ let pname = "jitsi-videobridge2"; - version = "2.1-595-g3637fda4"; + version = "2.2-9-g8cded16e"; src = fetchurl { url = "https://download.jitsi.org/stable/${pname}_${version}-1_all.deb"; - sha256 = "vwn9C8M3wwiIqwxAu1MDe2ra2SCQ2Hssco5J/xUFoKM="; + sha256 = "L9h+qYV/W2wPzycfDGC4AXpTl7wlulyt2KryA+Tb/YU="; }; in stdenv.mkDerivation { diff --git a/pkgs/servers/web-apps/jitsi-meet/default.nix b/pkgs/servers/web-apps/jitsi-meet/default.nix index 7be8ac573332..579ffb1a6777 100644 --- a/pkgs/servers/web-apps/jitsi-meet/default.nix +++ b/pkgs/servers/web-apps/jitsi-meet/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "jitsi-meet"; - version = "1.0.6155"; + version = "1.0.6260"; src = fetchurl { url = "https://download.jitsi.org/jitsi-meet/src/jitsi-meet-${version}.tar.bz2"; - sha256 = "baCRVYe1z2uH3vSb5KbWs0y4KyQYO3JpTyoGFZIZQqo="; + sha256 = "Y1ELKdFdbnq20yUt4XoXmstJm8uI8EBGIFOvFWf+5Uw="; }; dontBuild = true;