blob: a4435abeeaaa713a530f2f79d588426b4cbf79a5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
{ pkgs, ... }:
{
name = "jitsi-meet";
meta = {
maintainers = pkgs.lib.teams.jitsi.members;
};
node.pkgsReadOnly = false;
nodes = {
client =
{ nodes, pkgs, ... }:
{
};
server =
{ config, ... }:
{
# jitsi-meet inherits olm's known vulnerabilities
nixpkgs.config.permittedInsecurePackages = [ pkgs.jitsi-meet.name ];
services.jitsi-meet = {
enable = true;
hostName = "server";
jigasi.enable = true;
};
services.jitsi-videobridge.openFirewall = true;
networking.firewall.allowedTCPPorts = [
80
443
];
services.nginx.virtualHosts.server = {
enableACME = true;
forceSSL = true;
};
security.acme.acceptTerms = true;
security.acme.defaults.email = "me@example.org";
security.acme.defaults.server = "https://example.com"; # self-signed only
specialisation.caddy = {
inheritParentConfig = true;
configuration = {
services.jitsi-meet = {
caddy.enable = true;
nginx.enable = false;
};
services.caddy.virtualHosts.${config.services.jitsi-meet.hostName}.extraConfig = ''
tls internal
'';
};
};
};
};
testScript =
{ nodes, ... }:
''
server.wait_for_unit("jitsi-videobridge2.service")
server.wait_for_unit("jicofo.service")
server.wait_for_unit("jigasi.service")
server.wait_for_unit("nginx.service")
server.wait_for_unit("prosody.service")
server.wait_until_succeeds(
"journalctl -b -u prosody -o cat | grep -q 'Authenticated as focus@auth.server'"
)
server.wait_until_succeeds(
"journalctl -b -u prosody -o cat | grep -q 'Authenticated as jvb@auth.server'"
)
client.wait_for_unit("network.target")
def client_curl():
assert "<title>Jitsi Meet</title>" in client.succeed("curl -sSfkL http://server/")
client_curl()
with subtest("Testing backup service"):
server.succeed("${nodes.server.system.build.toplevel}/specialisation/caddy/bin/switch-to-configuration test")
server.wait_for_unit("caddy.service")
client_curl()
'';
}
|