7
submitted 1 year ago* (last edited 1 year ago) by hyveltjuven@lemmy.world to c/nix@programming.dev

Hi, new NixOS user here.

Liking it so far but just hit an issue that I'm having trouble getting past. Pages in firefox cannot access my geolocation, even after I hit allow when the page asks for permission. Same with the default Gnome maps app, it just places me in a central location of my countrys capital (I don't live in the capital).

I've added the following to my configuration.nix file and rebuilt but it made no difference.

 # Geolocation
  services.geoclue2.enable = true;

  environment.sessionVariables = {
    # Allows geolocation in firefox
    MOZ_ENABLE_WAYLAND = "1"; 
  };

What am I missing?

you are viewing a single comment's thread
view the rest of the comments
[-] hyveltjuven@lemmy.world 1 points 1 year ago

My output is slightly difference, it seems I'm not getting data from GeoIP, but from Wifi data.

$(nix-build '<nixpkgs>' -A geoclue2)/libexec/geoclue-2.0/demos/where-am-i
Client object: /org/freedesktop/GeoClue2/Client/1

New location:
Latitude:    <LAT from capital>°
Longitude:   <LONG from capital>°
Accuracy:    25000,000000 meters
Description: ipf fallback (from WiFi data)
Timestamp:   Wed Jul 23 2025 12:51:06 (1753267866 seconds since the Epoch)
[-] balsoft@lemmy.ml 1 points 1 year ago

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?

this post was submitted on 21 Jul 2025
7 points (88.9% liked)

Nix / NixOS

2860 readers
9 users here now

Main links

Videos

founded 3 years ago
MODERATORS