this post was submitted on 21 Jul 2025
7 points (88.9% liked)
Nix / NixOS
2576 readers
1 users here now
Main links
Videos
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Do you have some device that provides geolocation capabilities, e.g. a GPS modem, connected to your system? Because otherwise the only way to get your location is via geoip, which can be imprecise enough to place you in a different city, as you can see for yourself.
No gps modem but geolocation works on my other computer running fedora which also doesn't have gps.
Hm, interesting. The other user said that geoclue tries using beacondb (I didn't know that :D).
Can you try running this:
$(nix-build '<nixpkgs>' -A geoclue2)/libexec/geoclue-2.0/demos/where-am-i? It should print out your location according to geoclue, and the source which it has used.For me, it looks like this:
Just noticed that your accuarcy is at 25000 meters as well, are you getting anywhere near your actual location in map applications?
Well, it gets the city right at least, and that's enough for me
My output is slightly difference, it seems I'm not getting data from GeoIP, but from Wifi data.
Hmm, interesting. So this is probably the case of beacondb having incorrect data for your surrounding WiFi APs. I don't know why it works on the other laptop, maybe it uses a different location database?
GeoIP is the last way. Before that, geoclue will try to locate using found Wi-Fi and Cell towers via beacondb.net (via Mozilla Location Service before it shut down). If beacondb.net return fail or (0, 0), it try GeoIP at last.