Files
nix-config/modules/i18n/locale.org
T
phundrak ba018ef841 refactor: change to litterate config
Configuration is now held by the `.org` files. All `.nix` files are
tangled from the org-mode files.
2026-10-06 12:40:58 +02:00

1.2 KiB
Raw Blame History

Locale

Locale

I want my system messages in English, but everything else about how dates, money and paper sizes are formatted to reflect where I actually live. Here’s the nixos.locale module.

{
  flake.modules.nixos.locale = {
    i18n = {
      <<default-locale>>
      <<extra-locale-settings>>
    };
  };
}

Default Locale

en_DK.UTF-8 is a well-known trick: English messages and collation, but ISO 8601 dates and sane metric units, instead of en_US's nonsense MM/DD/YYYY and imperial units.

defaultLocale = "en_DK.UTF-8";

Regional Settings

Since I live in France, I want addresses, money, paper size, phone numbers and the like to follow French conventions instead of whatever en_DK would otherwise pick.

extraLocaleSettings = {
  LC_ADDRESS = "fr_FR.UTF-8";
  LC_IDENTIFICATION = "fr_FR.UTF-8";
  LC_MEASUREMENT = "fr_FR.UTF-8";
  LC_MONETARY = "fr_FR.UTF-8";
  LC_NAME = "fr_FR.UTF-8";
  LC_NUMERIC = "fr_FR.UTF-8";
  LC_PAPER = "fr_FR.UTF-8";
  LC_TELEPHONE = "fr_FR.UTF-8";
  LC_TIME = "fr_FR.UTF-8";
};