nixpkgs-suyu/modules/config/timezone.nix
Eelco Dolstra ce822289c3 * Create /etc/localtime as a symlink to the right zoneinfo file.
However, this won't do anything until we merge the stdenv branch.

svn path=/nixos/trunk/; revision=30071
2011-10-27 19:36:03 +00:00

31 lines
551 B
Nix

{ config, pkgs, ... }:
with pkgs.lib;
{
options = {
time.timeZone = mkOption {
default = "CET";
example = "America/New_York";
description = "The time zone used when displaying times and dates.";
};
};
config = {
environment.shellInit =
''
export TZ=${config.time.timeZone}
export TZDIR=${pkgs.glibc}/share/zoneinfo
'';
environment.etc = singleton
{ source = "${pkgs.glibc}/share/zoneinfo/${config.time.timeZone}";
target = "localtime";
};
};
}