diff options
Diffstat (limited to 'nixos/modules/config/i18n.nix')
-rw-r--r-- | nixos/modules/config/i18n.nix | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/nixos/modules/config/i18n.nix b/nixos/modules/config/i18n.nix index 53dd325457e..c55726d09c6 100644 --- a/nixos/modules/config/i18n.nix +++ b/nixos/modules/config/i18n.nix @@ -53,8 +53,18 @@ with lib; supportedLocales = mkOption { type = types.listOf types.str; - default = [ (config.i18n.defaultLocale + "/UTF-8") ]; - defaultText = literalExpression "[ (config.i18n.defaultLocale + \"/UTF-8\") ]"; + default = builtins.map (l: l + "/UTF-8") + (unique ( + [ config.i18n.defaultLocale ] ++ + (attrValues (filterAttrs (n: v: n != "LANGUAGE") config.i18n.extraLocaleSettings)) + )); + defaultText = literalExpression '' + builtins.map (l: l + "/UTF-8") + (unique ( + [ config.i18n.defaultLocale ] ++ + (attrValues (filterAttrs (n: v: n != "LANGUAGE") config.i18n.extraLocaleSettings)) + )) + ''; example = ["en_US.UTF-8/UTF-8" "nl_NL.UTF-8/UTF-8" "nl_NL/ISO-8859-1"]; description = '' List of locales that the system should support. The value |