From f34d1533c3f60a4e312de9f2dff1972d0558747a Mon Sep 17 00:00:00 2001 From: Sovran_SystemsOS Date: Tue, 1 Sep 2026 17:26:56 +0000 Subject: [PATCH] element-calling: fix Nix string interpolation of LAN_CIDR echo The debug echo used bash ${LAN_CIDR:-} syntax, but inside a Nix indented string ${...} is Nix interpolation, not bash. Nix parsed 'LAN_CIDR:-' as a lambda and failed the build with 'cannot coerce a function to a string'. Rewrite the echo without brace expansion. --- modules/element-calling.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/element-calling.nix b/modules/element-calling.nix index bd01f57..7ae83e9 100755 --- a/modules/element-calling.nix +++ b/modules/element-calling.nix @@ -191,7 +191,7 @@ EOF # interface's own address, so it always matches the subnet the LAN # clients (phones on Wi-Fi) actually live on. LAN_CIDR=$(ip -4 -o addr show dev "$IFACE" | awk '{print $4}' | grep -vE '^(127\.|169\.254\.)' | head -n1 | python3 -c 'import sys, ipaddress; s = sys.stdin.read().strip(); print(str(ipaddress.ip_network(s, strict=False)) if s else "")' 2>/dev/null) - echo "Derived LAN CIDR for TURN relay: ${LAN_CIDR:-}" + if [ -n "$LAN_CIDR" ]; then echo "Derived LAN CIDR for TURN relay: $LAN_CIDR"; else echo "Derived LAN CIDR for TURN relay: "; fi # Generate the full LiveKit config the daemon will load. turn.domain and # rtc.interfaces.includes are only known at runtime, so they are