mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-13 12:13:46 +01:00
ICU takes the zone name from the /etc/localtime symlink target path. A bind mount turns it into a plain file, which keeps the TZif data but loses the path, so the only identifier left is the ambiguous "CST" abbreviation that ICU reads from the file and maps to America/Chicago. Export TZ from time.timeZone and pass TZ/TZDIR through the nixpak env allowlist. Assisted-by: DeepSeek Harness (deepseek-flash)
20 lines
684 B
Nix
20 lines
684 B
Nix
{ config, lib, ... }:
|
|
{
|
|
# Set your time zone. A default: the computer-use VMs match their proxy region.
|
|
time.timeZone = lib.mkDefault "Asia/Shanghai";
|
|
|
|
# Passed through to nixpak sandboxes; see hardening/nixpaks/modules/desktop-base.nix.
|
|
environment.sessionVariables.TZ = config.time.timeZone;
|
|
|
|
# English is the default. Chinese overrides only the categories where the
|
|
# en_US default is factually wrong for China (metric, A4, CNY); everything
|
|
# else, including date/time names, stays English.
|
|
i18n.defaultLocale = "en_US.UTF-8";
|
|
|
|
i18n.extraLocaleSettings = {
|
|
LC_MEASUREMENT = "zh_CN.UTF-8";
|
|
LC_MONETARY = "zh_CN.UTF-8";
|
|
LC_PAPER = "zh_CN.UTF-8";
|
|
};
|
|
}
|