KDE Night Light can't get location despite installing geoclue2

For some reason, the location part of KDE’s Night Light remains at 0, 0:

image

I first tried adding kdePackages.networkmanager-qt because apparently it was a requirement for other distros, but after running systemsettings and watching the output while going into the Night Light panel it seems like it needs geoclue2. So I added it to my package list:

However, the log output still shows this after rebooting, and the location is stuck at 0, 0:

qt.positioning.geoclue2: Unable to obtain the client: "org.freedesktop.systemd1.NoSuchUnit" "Unit geoclue.service not found."

What am I missing here?

Made some progress; turns out I need to enable the geoclue2 option instead of adding simply the package since KDE needs the systemd service file. See commit: wendy: use geoclue2 service not package · ericswpark/nixos-config@94a57e1 · GitHub

This finally got the “Locating…” with the progressbar to show up. Unfortunately the location is still shown as 0, 0 after, so something else is wrong.

This is the error I get in the terminal after a location lookup fails:

qt.positioning.geoclue2: Unable to obtain the client: "org.freedesktop.DBus.Error.NoReply" "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."