mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-29 16:24:10 +00:00
* 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:
parent
1fe1481adf
commit
ce822289c3
@ -1,10 +1,11 @@
|
||||
{pkgs, config, ...}:
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
with pkgs.lib;
|
||||
|
||||
{
|
||||
options = {
|
||||
|
||||
time.timeZone = pkgs.lib.mkOption {
|
||||
time.timeZone = mkOption {
|
||||
default = "CET";
|
||||
example = "America/New_York";
|
||||
description = "The time zone used when displaying times and dates.";
|
||||
@ -12,14 +13,19 @@ let
|
||||
|
||||
};
|
||||
|
||||
in
|
||||
config = {
|
||||
|
||||
{
|
||||
require = [options];
|
||||
environment.shellInit =
|
||||
''
|
||||
export TZ=${config.time.timeZone}
|
||||
export TZDIR=${pkgs.glibc}/share/zoneinfo
|
||||
'';
|
||||
|
||||
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";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user