Matrix: Difference between revisions
m disable livekit auto room creation as per lk-jwt-service upstream docs |
m livekit: simplify key creation unit with ConditionPathExists |
||
| Line 188: | 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 | ||