mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-21 21:23:06 +00:00
ce822289c3
However, this won't do anything until we merge the stdenv branch. svn path=/nixos/trunk/; revision=30071
32 lines
551 B
Nix
32 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";
|
|
};
|
|
|
|
};
|
|
|
|
}
|