1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 21:21:06 +00:00

Set TZDIR for all systemd services

This only matters if a service also overrides the $TZ variable.

Issue #2447.
This commit is contained in:
Eelco Dolstra 2014-05-21 18:26:13 +02:00
parent 927b385cc9
commit 7fd13ddc66

View file

@ -2,6 +2,12 @@
with lib;
let
tzdir = "${pkgs.tzdata}/share/zoneinfo";
in
{
options = {
@ -26,8 +32,10 @@ with lib;
environment.variables.TZDIR = "/etc/zoneinfo";
systemd.globalEnvironment.TZDIR = tzdir;
environment.etc.localtime =
{ source = "${pkgs.tzdata}/share/zoneinfo/${config.time.timeZone}";
{ source = "${tzdir}/${config.time.timeZone}";
mode = "direct-symlink";
};