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