2011-10-27 21:36:03 +02:00
|
|
|
{ config, pkgs, ... }:
|
2009-05-28 01:14:38 +02:00
|
|
|
|
2011-10-27 21:36:03 +02:00
|
|
|
with pkgs.lib;
|
2009-05-28 01:14:38 +02:00
|
|
|
|
2011-10-27 21:36:03 +02:00
|
|
|
{
|
2009-05-28 01:14:38 +02:00
|
|
|
options = {
|
|
|
|
|
2011-10-27 21:36:03 +02:00
|
|
|
time.timeZone = mkOption {
|
2009-05-28 01:14:38 +02:00
|
|
|
default = "CET";
|
2012-06-21 12:47:44 +02:00
|
|
|
type = with types; uniq string;
|
2009-05-28 01:14:38 +02:00
|
|
|
example = "America/New_York";
|
|
|
|
description = "The time zone used when displaying times and dates.";
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2011-10-27 21:36:03 +02:00
|
|
|
config = {
|
2009-05-28 01:14:38 +02:00
|
|
|
|
2011-10-27 21:36:03 +02:00
|
|
|
environment.shellInit =
|
|
|
|
''
|
|
|
|
export TZ=${config.time.timeZone}
|
|
|
|
export TZDIR=${pkgs.glibc}/share/zoneinfo
|
|
|
|
'';
|
2009-05-28 01:14:38 +02:00
|
|
|
|
2011-10-27 21:36:03 +02:00
|
|
|
environment.etc = singleton
|
|
|
|
{ source = "${pkgs.glibc}/share/zoneinfo/${config.time.timeZone}";
|
|
|
|
target = "localtime";
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2009-05-28 01:14:38 +02:00
|
|
|
}
|