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.


1 Answer 1


Setting services.localtimed.enable = true; in NixOS 23.05 does seem to work as expected:

❯ journalctl --boot --output=cat --unit=localtimed
Starting localtimed.service...
Started localtimed.service.
2023/10/09 08:59:12 Updated timezone to: Pacific/Auckland

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .