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:
parent
927b385cc9
commit
7fd13ddc66
|
@ -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";
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue