mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 16:03:23 +00:00
c32d0180e4
Now that Java is happy with our /etc/localtime, there is no reason to set $TZ anymore. (See945849b86f
,279248f6c5
, 1b5e860f65607b4cc7de4b6b5db95460cf144526.) Fixes #1463.
39 lines
749 B
Nix
39 lines
749 B
Nix
{ config, pkgs, ... }:
|
|
|
|
with pkgs.lib;
|
|
|
|
{
|
|
options = {
|
|
|
|
time = {
|
|
|
|
timeZone = mkOption {
|
|
default = "CET";
|
|
type = types.str;
|
|
example = "America/New_York";
|
|
description = "The time zone used when displaying times and dates.";
|
|
};
|
|
|
|
hardwareClockInLocalTime = mkOption {
|
|
default = false;
|
|
description = "If set, keep the hardware clock in local time instead of UTC.";
|
|
};
|
|
|
|
};
|
|
};
|
|
|
|
config = {
|
|
|
|
environment.variables.TZDIR = "/etc/zoneinfo";
|
|
|
|
environment.etc.localtime =
|
|
{ source = "${pkgs.tzdata}/share/zoneinfo/${config.time.timeZone}";
|
|
mode = "direct-symlink";
|
|
};
|
|
|
|
environment.etc.zoneinfo.source = "${pkgs.tzdata}/share/zoneinfo";
|
|
|
|
};
|
|
|
|
}
|