Setting services.localtime.enable = true; should start a "simple daemon for keeping the system timezone up-to-date based on the current location.", but it doesn't:

Failed to get target of /etc/localtime: No such file or directory

touch /etc/localtime might fix it in the short run, but I don't expect that's a reasonable workaround – NixOS' /etc is not meant to be hacked this way, after all. I guess some other setting is also needed to make this work, but the documentation doesn't mention anything. Unfortunately the bug report linked above hasn't received any attention, so I hope someone in this community knows what to do.

Setting time.timeZone = "UTC"; as well results in the service starting. However, the service (and the geoclue service) don't produce any useful output:

$ journalctl --boot --output=cat --unit geoclue.service
Starting Location Lookup Service...
Started Location Lookup Service.
$ journalctl --boot --output=cat --unit systemd-timedated.service
Starting Time & Date Service...
Started Time & Date Service.
Failed to set timezone: Europe/Zurich

and the /etc/localtime symlink keeps pointing to /etc/zoneinfo/UTC even after being online for an hour or so.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.