* 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
This commit is contained in:
Eelco Dolstra 2011-10-27 19:36:03 +00:00
parent 1fe1481adf
commit ce822289c3

View File

@ -1,10 +1,11 @@
{pkgs, config, ...}: { config, pkgs, ... }:
let with pkgs.lib;
{
options = { options = {
time.timeZone = pkgs.lib.mkOption { time.timeZone = mkOption {
default = "CET"; default = "CET";
example = "America/New_York"; example = "America/New_York";
description = "The time zone used when displaying times and dates."; description = "The time zone used when displaying times and dates.";
@ -12,14 +13,19 @@ let
}; };
in config = {
{ environment.shellInit =
require = [options]; ''
export TZ=${config.time.timeZone}
export TZDIR=${pkgs.glibc}/share/zoneinfo
'';
environment.shellInit = environment.etc = singleton
'' { source = "${pkgs.glibc}/share/zoneinfo/${config.time.timeZone}";
export TZ=${config.time.timeZone} target = "localtime";
export TZDIR=${pkgs.glibc}/share/zoneinfo };
'';
};
} }