Change:
<del> { lib, stdenv, fetchFromGitLab, intltool, meson, ninja, pkg-config, gtk-doc, docbook_xsl, docbook_xml_dtd_412, glib, json-glib, libsoup, libnotify, gdk-pixbuf , modemmanager, avahi, glib-networking, python3, wrapGAppsHook, gobject-introspection, vala </del> <ins> { lib , stdenv , fetchFromGitLab , fetchpatch , intltool , meson , ninja , pkg-config , gtk-doc , docbook-xsl-nons , docbook_xml_dtd_412 , glib , json-glib , libsoup , libnotify , gdk-pixbuf , modemmanager , avahi , glib-networking , python3 , wrapGAppsHook , gobject-introspection , vala </ins> , withDemoAgent ? false }: <del> with lib; </del> stdenv.mkDerivation rec { pname = "geoclue"; <del> version = "2.5.6"; </del> <ins> version = "2.5.7"; outputs = [ "out" "dev" "devdoc" ]; </ins> src = fetchFromGitLab { domain = "gitlab.freedesktop.org"; owner = pname; repo = pname; rev = version; <del> sha256 = "13fk6n4j74lvcsrg3kwbw1mkxgcr3iy9dnysmy0pclfsym8z5m5m"; </del> <ins> sha256 = "1mv1vs4q94bqkmgkj53jcsw1x31kczwydyy3r27a7fycgzmii1pj"; </ins> }; patches = [ <ins> # Make the Mozilla API key configurable # https://gitlab.freedesktop.org/geoclue/geoclue/merge_requests/54 (only partially backported) (fetchpatch { url = "https://gitlab.freedesktop.org/geoclue/geoclue/commit/95c9ad4dc176860c85a07d0db4cb4179929bdb54.patch"; sha256 = "/lq/dLBJl2vf16tt7emYoTtXY6iUw+4s2XcABUHp3Kc="; }) (fetchpatch { url = "https://gitlab.freedesktop.org/geoclue/geoclue/commit/1a00809a0d89b0849a57647c878d192354247a33.patch"; sha256 = "6FuiukgFWg2cEKt8LlKP4E0rfSH/ZQgk6Ip1mGJpNFQ="; }) </ins> ./add-option-for-installation-sysconfdir.patch ]; <del> outputs = [ "out" "dev" "devdoc" ]; </del> nativeBuildInputs = [ <del> pkg-config intltool meson ninja wrapGAppsHook python3 vala gobject-introspection </del> <ins> pkg-config intltool meson ninja wrapGAppsHook python3 vala gobject-introspection </ins> # devdoc <del> gtk-doc docbook_xsl docbook_xml_dtd_412 </del> <ins> gtk-doc docbook-xsl-nons docbook_xml_dtd_412 </ins> ]; buildInputs = [ <del> glib json-glib libsoup avahi ] ++ optionals withDemoAgent [ </del> <ins> glib json-glib libsoup avahi ] ++ lib.optionals withDemoAgent [ </ins> libnotify gdk-pixbuf <del> ] ++ optionals (!stdenv.isDarwin) [ modemmanager ]; </del> <ins> ] ++ lib.optionals (!stdenv.isDarwin) [ modemmanager ]; </ins> <del> propagatedBuildInputs = [ glib glib-networking ]; </del> <ins> propagatedBuildInputs = [ glib glib-networking ]; </ins> mesonFlags = [ "-Dsystemd-system-unit-dir=${placeholder "out"}/etc/systemd/system" <del> "-Ddemo-agent=${boolToString withDemoAgent}" </del> <ins> "-Ddemo-agent=${lib.boolToString withDemoAgent}" </ins> "--sysconfdir=/etc" "-Dsysconfdir_install=${placeholder "out"}/etc" <ins> "-Dmozilla-api-key=5c28d1f4-9511-47ff-b11a-2bef80fc177c" </ins> "-Ddbus-srv-user=geoclue" "-Ddbus-sys-dir=${placeholder "out"}/share/dbus-1/system.d" <del> ] ++ optionals stdenv.isDarwin [ </del> <ins> ] ++ lib.optionals stdenv.isDarwin [ </ins> "-D3g-source=false" "-Dcdma-source=false" "-Dmodem-gps-source=false"

Discussion:
Describe the bug geoclue2 service doesn't work at the moment of writing this. It seems we're hitting the problem of too many requests with default token . (). This also prevents redshift service from starting correctly when location provider is set to geoclue2. To Reproduce Steps to reproduce the behavior: location provider to geoclue Additional context I'm not sure if API is limitting based on api key or something machine specific like IP address. Notify maintainers Metadata Please run and paste the result. Maintainer information:
Thanks for looking into this! I was wondering why occasionally redshift would get stuck waiting for the location. It looks like Mozilla is recommending that distros register their own key now that they're finding heavy load on the geoclue key:
Yeah, so the solution as mentioned is we have to register our own key.
I think we're on the same page then. I also wanted to recommend that. Do we know who can take care of it?
I was just looking at the API key request form. I would be happy to fill out this form and be in contact with people at mozilla to recieve a key. They state in the form "As Mozilla offers MLS as a free service, we cannot provide keys to everyone who requests one. Your request is more likely to be granted if you provide a detailed explanation of your project and intended use. ", so I guess I need to flex NixOS as deserving and relevant in order to receive a key I guess :grin:
great thanks for taking care of that.
Just completed it Their insistence on "being detailed" in the that form is probably going to fall away given that every distro is probably going to want one, and there's a lot of them...
Just updating that in a 1 week + time there hasn't been a response to me personally.
For the record I've hit this issues few times in meantime but almost always when I did some reboot, login or restart of the services in the evening of central European time). If that happened I just restarted the service the next day in morning. I think folks living in Americas might be likely more impacted by this (assuming they're more likely to boot at a time when this is down) but I of course don't have any data about that.

It doesn't seem to be that serious issue but certainly I still hope we will be able to get the key from Mozilla and solve it anyway.
I got a response from them. What we need to do is... :grin: Do the same thing as arch has done with patching , which will make the API key configurable. We'd then have to change the module, maybe add options and change the default and example values. And also we need to add a comment to the geoclue expression that changes to the configuration need to be monitored and the nixos module should be updated (same as NetworkManager).