Files
nix-config/modules/nixos/base/i18n.nix
T
Ryan Yin c4a00e507c fix(nixpak): pass the session TZ through to sandboxes
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)
2026-11-04 21:38:18 +08:00

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";
};
}