2011-10-27 15:36:03 -04:00
|
|
|
{ config, pkgs, ... }:
|
2009-05-27 19:14:38 -04:00
|
|
|
|
2011-10-27 15:36:03 -04:00
|
|
|
with pkgs.lib;
|
2009-05-27 19:14:38 -04:00
|
|
|
|
2011-10-27 15:36:03 -04:00
|
|
|
{
|
2009-05-27 19:14:38 -04:00
|
|
|
options = {
|
|
|
|
|
2012-07-02 15:34:27 -04:00
|
|
|
time = {
|
2013-04-22 12:56:19 -04:00
|
|
|
|
2012-07-02 15:34:27 -04:00
|
|
|
timeZone = mkOption {
|
|
|
|
default = "CET";
|
|
|
|
type = with types; uniq string;
|
|
|
|
example = "America/New_York";
|
|
|
|
description = "The time zone used when displaying times and dates.";
|
|
|
|
};
|
2009-05-27 19:14:38 -04:00
|
|
|
|
2012-07-11 15:33:34 -04:00
|
|
|
hardwareClockInLocalTime = mkOption {
|
2012-07-02 15:34:27 -04:00
|
|
|
default = false;
|
2012-07-11 15:33:34 -04:00
|
|
|
description = "If set, keep the hardware clock in local time instead of UTC.";
|
2012-07-02 15:34:27 -04:00
|
|
|
};
|
2013-04-22 12:56:19 -04:00
|
|
|
|
2012-07-02 15:34:27 -04:00
|
|
|
};
|
2009-05-27 19:14:38 -04:00
|
|
|
};
|
|
|
|
|
2011-10-27 15:36:03 -04:00
|
|
|
config = {
|
2009-05-27 19:14:38 -04:00
|
|
|
|
2013-09-17 23:18:34 -04:00
|
|
|
environment.variables.TZDIR.value = "/etc/zoneinfo";
|
|
|
|
environment.variables.TZ.value = config.time.timeZone;
|
2009-05-27 19:14:38 -04:00
|
|
|
|
2013-04-22 13:08:16 -04:00
|
|
|
environment.etc.localtime.source = "${pkgs.tzdata}/share/zoneinfo/${config.time.timeZone}";
|
|
|
|
|
|
|
|
environment.etc.zoneinfo.source = "${pkgs.tzdata}/share/zoneinfo";
|
2013-04-22 12:56:19 -04:00
|
|
|
|
2011-10-27 15:36:03 -04:00
|
|
|
};
|
2013-04-22 12:56:19 -04:00
|
|
|
|
2009-05-27 19:14:38 -04:00
|
|
|
}
|