diff --git a/system/etc.nix b/system/etc.nix index d29c869ba97..da04d8d961e 100644 --- a/system/etc.nix +++ b/system/etc.nix @@ -72,6 +72,7 @@ import ../helpers/make-etc.nix { src = ./etc/profile.sh; inherit systemPath wrapperDir; inherit (pkgs) kernel; + timeZone = config.get ["time" "timeZone"]; }; target = "profile"; } diff --git a/system/etc/profile.sh b/system/etc/profile.sh index 18f81f58c78..f2b8d3c8dcf 100644 --- a/system/etc/profile.sh +++ b/system/etc/profile.sh @@ -2,6 +2,7 @@ export PATH=@wrapperDir@:@systemPath@/bin:@systemPath@/sbin export MODULE_DIR=@kernel@/lib/modules export NIX_CONF_DIR=/nix/etc/nix export PAGER=less +export TZ=@timeZone@ PROMPT_COLOR="1;31m" PS1="\n\[\033[$PROMPT_COLOR\][\u@\h:\w]$\[\033[0m\] " diff --git a/system/options.nix b/system/options.nix index 0debe2f83de..311c9a7995b 100644 --- a/system/options.nix +++ b/system/options.nix @@ -9,6 +9,14 @@ description = "The name of the machine."; } + + { + name = ["time" "timeZone"]; + default = "CET"; + example = "America/New_York"; + description = "The time zone used when displaying times and dates."; + } + { name = ["boot" "autoDetectRootDevice"];