Change:
I'm not entirely sure when this started happening, but I now see the following in my logs. redshift: localtime: This seems to be an old issue that's recurred, see e.g. The last comment has this message, and suggests that the issue may have started between geoclue 2.4.7-1 and 2.4.10-1. Previous commenters seem to have a different issue (which it seems like we should also have, since I can't find that we install the files anywhere, possibly because the module doesn't add to ). The localtime dev also seems to have noticed this issue: Try or system: host os: multi-user?: sandbox: version: channels(michael): channels(root): nixpkgs:
Hm, some other people have reported () that geoclue is crashing when redshift tries to connect with it. This is actually consistent with what I'm seeing - the geoclue service also seems to be restarting constantly, although I don't get any crash message.
Is whitelisting redshift the solution, or is it clear? I miss redshift :(.
There's some hope that upgrading geoclue might help, however I'm struggling to get the new version to build.
I managed to build the new version with the docs disabled, but it doesn't seem to change anything. For localtime, I don't believe the issue is the permissions one, but perhaps rather that they've started requiring an "agent" that we don't have (, perhaps?). It gives the corresponding error message that's in that commit. I have no idea what's wrong with redshift, it could be a similar thing?
Here's what I've tried so far: Updating geoclue to 2.4.11. Adding a service that runs the geoclue demo agent. Neither of these seem to have helped at all. The agent just sits there saying regardless, and everything still fails :( I am using KDE, possibly there should be a location services agent associated with that, but I'm not sure where to find that.
Some progress, enough to fix redshift at least:
It's possible that this situation will get a bit better - a geoclue dev has popped up in and seems to be somewhat aware of the problems this has caused.
So I have yet still crashes for me with the above error. Any ideas?
Localtime is still broken. See for my suggestion on how to get a sensible fix. The maintainer has agreed, but hasn't done anything yet.
I'm getting constantly message , is that a side-effect of this bug? :)
That's probably the geoclue default agent, which we're using because you have to have one, and which tries to ask for permission for an app to get the location. On KDE at least it displays a popup, possibly it doesn't work as well on your DE.
already knows this, but for everyone else playing along, the geoclue app-whitelist change has since been applied, which might open up the possibility for redshift and localtime to get fixed in NixOS.
1) this commit didn't make it in last release and could be potentially an issue 2) I'm testing now backporting meson bump to 18.09 as it's required by latest geoclue2
Maybe for 18.09 best solution is to downgrade geoclue? It's nearly impossible to bump meson in a stable channel.
See for 18.09 reverts.

Discussion:
with lib; <ins> let # the demo agent isn't built by default, but we need it here package = pkgs.geoclue2.override { withDemoAgent = config.services.geoclue2.enableDemoAgent; }; in </ins> { ###### interface

''; }; <ins> enableDemoAgent = mkOption { type = types.bool; default = true; description = '' Whether to use the GeoClue demo agent. This should be overridden by desktop environments that provide their own agent. ''; }; </ins> }; }; ###### implementation config = mkIf config.services.geoclue2.enable { <del> environment.systemPackages = [ pkgs.geoclue2 ]; services.dbus.packages = [ pkgs.geoclue2 ]; systemd.packages = [ pkgs.geoclue2 ]; </del> <ins> environment.systemPackages = [ package ]; services.dbus.packages = [ package ]; systemd.packages = [ package ]; # this needs to run as a user service, since it's associated with the # user who is making the requests systemd.user.services = mkIf config.services.geoclue2.enableDemoAgent { "geoclue-agent" = { description = "Geoclue agent"; script = "${package}/libexec/geoclue-2.0/demos/agent"; # this should really be `partOf = [ "geoclue.service" ]`, but # we can't be part of a system service, and the agent should # be okay with the main service coming and going wantedBy = [ "default.target" ]; }; }; </ins> }; }

config = mkIf cfg.enable { services.geoclue2.enable = true; <del> security.polkit.extraConfig = '' polkit.addRule(function(action, subject) { if (action.id == "org.freedesktop.timedate1.set-timezone" && subject.user == "localtimed") { return polkit.Result.YES; } }); ''; </del> <ins> # so polkit will pick up the rules environment.systemPackages = [ pkgs.localtime ]; </ins> users.users = [{ name = "localtimed";

services.udisks2.enable = true; services.accounts-daemon.enable = true; services.geoclue2.enable = mkDefault true; <ins> # GNOME should have its own geoclue agent services.geoclue2.enableDemoAgent = false; </ins> services.dleyna-renderer.enable = mkDefault true; services.dleyna-server.enable = mkDefault true; services.gnome3.at-spi2-core.enable = true;

} ]; <ins> # needed so that .desktop files are installed, which geoclue cares about environment.systemPackages = [ cfg.package ]; </ins> services.geoclue2.enable = mkIf (cfg.provider == "geoclue2") true; systemd.user.services.redshift =

postFixup = "wrapPythonPrograms"; <ins> # the geoclue agent may inspect these paths and expect them to be # valid without having the correct $PATH set postInstall = '' substituteInPlace $out/share/applications/redshift.desktop  --replace 'Exec=redshift' "Exec=$out/bin/redshift" substituteInPlace $out/share/applications/redshift.desktop  --replace 'Exec=redshift-gtk' "Exec=$out/bin/redshift-gtk" ''; </ins> enableParallelBuilding = true; meta = with stdenv.lib; {

stdenv.mkDerivation rec { name = "geoclue-${version}"; <del> version = "2.4.10"; </del> <ins> version = "2.4.12"; </ins> src = fetchurl { url = "https://www.freedesktop.org/software/geoclue/releases/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz"; <del> sha256 = "0h4n8jf7w457sglfdhghkyf8n4v4a5jrx8dgdy5zn35nbscx24l4"; </del> <ins> sha256 = "1jnad1f3rf8h05sz1lc172jnqdhqdpz76ff6m7i5ss3s0znf5l05"; </ins> }; outputs = [ "out" "dev" "devdoc" ]; nativeBuildInputs = [ <del> pkgconfig intltool gtk-doc docbook_xsl docbook_xml_dtd_412 wrapGAppsHook gobjectIntrospection </del> <ins> pkgconfig intltool wrapGAppsHook gobjectIntrospection # devdoc gtk-doc docbook_xsl docbook_xml_dtd_412 </ins> ]; buildInputs = [

"--disable-nmea-source" ]; <del> # https://gitlab.freedesktop.org/geoclue/geoclue/issues/73 postInstall = '' sed -i $dev/lib/pkgconfig/libgeoclue-2.0.pc -e "s|includedir=.*|includedir=$dev/include|" ''; </del> meta = with stdenv.lib; { description = "Geolocation framework and some data providers"; homepage = https://gitlab.freedesktop.org/geoclue/geoclue/wikis/home;