Create a /etc/zoneinfo symlink and use it in $TZDIR

Setting $TZDIR to ${pkgs.tzdata}/share/zoneinfo can cause logged-in
sessions to refer to a garbage-collected zoneinfo directory.  So use
/etc/zoneinfo instead.
This commit is contained in:
Eelco Dolstra 2013-04-22 19:08:16 +02:00
parent 945849b86f
commit 447691836a

View File

@ -26,13 +26,12 @@ with pkgs.lib;
environment.shellInit =
''
export TZDIR=${pkgs.tzdata}/share/zoneinfo
export TZDIR=/etc/zoneinfo
'';
environment.etc = singleton
{ source = "${pkgs.tzdata}/share/zoneinfo/${config.time.timeZone}";
target = "localtime";
};
environment.etc.localtime.source = "${pkgs.tzdata}/share/zoneinfo/${config.time.timeZone}";
environment.etc.zoneinfo.source = "${pkgs.tzdata}/share/zoneinfo";
};