Matrix: Difference between revisions
add instructions to setup livekit for use withe element-call or Element X |
m livekit: simplify key creation unit with ConditionPathExists |
||
| (One intermediate revision by the same user not shown) | |||
| Line 173: | Line 173: | ||
enable = true; | enable = true; | ||
openFirewall = true; | openFirewall = true; | ||
settings.room.auto_create = false; | |||
inherit keyFile; | inherit keyFile; | ||
}; | }; | ||
| Line 187: | Line 188: | ||
path = with pkgs; [ livekit coreutils gawk ]; | path = with pkgs; [ livekit coreutils gawk ]; | ||
script = '' | script = '' | ||
echo "Key missing, generating key" | echo "Key missing, generating key" | ||
echo "lk-jwt-service: $(livekit-server generate-keys | tail -1 | awk '{print $3}')" > "${keyFile}" | echo "lk-jwt-service: $(livekit-server generate-keys | tail -1 | awk '{print $3}')" > "${keyFile}" | ||
''; | ''; | ||
serviceConfig.Type = "oneshot"; | serviceConfig.Type = "oneshot"; | ||
unitConfig.ConditionPathExists = "!${keyFile}"; | |||
}; | }; | ||
# restrict access to livekit room creation to a homeserver | # restrict access to livekit room creation to a homeserver | ||