nixos/i18n: hide supportedLocales from the manual

musjj 401ec59a 073e4bd6

Changed files
+2 -16
nixos
doc
manual
configuration
modules
config
+1 -1
nixos/doc/manual/configuration/profiles/minimal.section.md
···
# Minimal {#sec-profile-minimal}
This profile defines a small NixOS configuration. It does not contain any
-
graphical stuff. It's a very short file that sets [](#opt-i18n.supportedLocales)
+
graphical stuff. It's a very short file that sets the supported locales
to only support the user-selected locale, and
[disables packages' documentation](#opt-documentation.enable).
+1 -15
nixos/modules/config/i18n.nix
···
supportedLocales = lib.mkOption {
type = lib.types.listOf lib.types.str;
+
visible = false;
default = lib.unique (
builtins.map
(l: (lib.replaceStrings [ "utf8" "utf-8" "UTF8" ] [ "UTF-8" "UTF-8" "UTF-8" ] l) + "/UTF-8")
···
++ (lib.attrValues (lib.filterAttrs (n: v: n != "LANGUAGE") config.i18n.extraLocaleSettings))
)
);
-
defaultText = lib.literalExpression ''
-
lib.unique (
-
builtins.map
-
(l: (lib.replaceStrings [ "utf8" "utf-8" "UTF8" ] [ "UTF-8" "UTF-8" "UTF-8" ] l) + "/UTF-8")
-
(
-
[
-
"C.UTF-8"
-
"en_US.UTF-8"
-
config.i18n.defaultLocale
-
]
-
++ config.i18n.extraLocales
-
++ (lib.attrValues (lib.filterAttrs (n: v: n != "LANGUAGE") config.i18n.extraLocaleSettings))
-
)
-
)
-
'';
example = [
"en_US.UTF-8/UTF-8"
"nl_NL.UTF-8/UTF-8"