Evaluation error introduced in a0d464033c2bacffa9c05d27903fb03cd09ace46.
If the value for timeZone is null it shouldn't be even tried to coerce
it into a string.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Cc: @lheckemann, @joachifm
Using pkgs.lib on the spine of module evaluation is problematic
because the pkgs argument depends on the result of module
evaluation. To prevent an infinite recursion, pkgs and some of the
modules are evaluated twice, which is inefficient. Using ‘with lib’
prevents this problem.
Now that Java is happy with our /etc/localtime, there is no reason to
set $TZ anymore. (See 945849b86fe33474da569b307d7e5880877491b6, 279248f6c562eb88227d22b824c9324683980b96, 1b5e860f65607b4cc7de4b6b5db95460cf144526.)
Fixes#1463.
Some programs (notably the Java Runtime Environment) expect to be able
to extract the name of the time zone from the target of the
/etc/localtime symlink. That doesn't work if /etc/localtime is a
symlink to /etc/static/localtime. So make it a direct symlink.