diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-05-21 18:26:13 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-05-21 18:31:40 +0200 |
commit | 7fd13ddc66a0dfa07dd0eadf3c5a01ce28cc41f1 (patch) | |
tree | 7e0c3f5c7b59e4f8697d7fc1211d4114d8c10c41 | |
parent | 927b385cc9d7b297c96aef3698ee3b5f0aee2a87 (diff) | |
download | nixlib-7fd13ddc66a0dfa07dd0eadf3c5a01ce28cc41f1.tar nixlib-7fd13ddc66a0dfa07dd0eadf3c5a01ce28cc41f1.tar.gz nixlib-7fd13ddc66a0dfa07dd0eadf3c5a01ce28cc41f1.tar.bz2 nixlib-7fd13ddc66a0dfa07dd0eadf3c5a01ce28cc41f1.tar.lz nixlib-7fd13ddc66a0dfa07dd0eadf3c5a01ce28cc41f1.tar.xz nixlib-7fd13ddc66a0dfa07dd0eadf3c5a01ce28cc41f1.tar.zst nixlib-7fd13ddc66a0dfa07dd0eadf3c5a01ce28cc41f1.zip |
Set TZDIR for all systemd services
This only matters if a service also overrides the $TZ variable. Issue #2447.
-rw-r--r-- | nixos/modules/config/timezone.nix | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/nixos/modules/config/timezone.nix b/nixos/modules/config/timezone.nix index 88aa7866c2b2..65703d8bb080 100644 --- a/nixos/modules/config/timezone.nix +++ b/nixos/modules/config/timezone.nix @@ -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"; }; |