From 263297b4e5d3aa820be4b98e20e00a40e33aa4e7 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sun, 18 May 2025 18:43:20 +0300 Subject: [PATCH] nixos/i18n: Remove special handling of LANGUAGE Partially revert #179194 which first filtered `extraLocaleSettings.LANGUAGE`. Indeed this environment variable is given precedence according to: https://www.gnu.org/software/gettext/manual/html_node/Locale-Environment-Variables.html So using it will simply make all other `extraLocaleSettings` be ignored in practice, but the OS shouldn't ignore it when aggregating the locales required in general, as this setup should still be legitimate, and it may even be useful if you wish to set it by default and use `env -u LANGUAGE` for some programs. --- nixos/modules/config/i18n.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/nixos/modules/config/i18n.nix b/nixos/modules/config/i18n.nix index 02498dd15363..22a47d5bdffa 100644 --- a/nixos/modules/config/i18n.nix +++ b/nixos/modules/config/i18n.nix @@ -12,8 +12,6 @@ let "${config.i18n.defaultLocale}/${config.i18n.defaultCharset}" ] ++ lib.pipe config.i18n.extraLocaleSettings [ - # TODO: Explain why is this filter added here... - (lib.filterAttrs (n: v: n != "LANGUAGE")) (lib.mapAttrs (n: v: (sanitizeUTF8Capitalization v))) (lib.mapAttrsToList (LCRole: lang: lang + "/" + (config.i18n.localeCharsets.${LCRole} or "UTF-8"))) ]