From 401ec59a17127a755a097267b3156458fb8236c0 Mon Sep 17 00:00:00 2001 From: musjj <72612857+musjj@users.noreply.github.com> Date: Sun, 27 Apr 2025 18:29:09 +0700 Subject: [PATCH] nixos/i18n: hide supportedLocales from the manual --- .../configuration/profiles/minimal.section.md | 2 +- nixos/modules/config/i18n.nix | 16 +--------------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/nixos/doc/manual/configuration/profiles/minimal.section.md b/nixos/doc/manual/configuration/profiles/minimal.section.md index 5b72112477f7..cfbd7ae6067b 100644 --- a/nixos/doc/manual/configuration/profiles/minimal.section.md +++ b/nixos/doc/manual/configuration/profiles/minimal.section.md @@ -1,6 +1,6 @@ # 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). diff --git a/nixos/modules/config/i18n.nix b/nixos/modules/config/i18n.nix index 0213274ec3a6..8aba9e9f9c92 100644 --- a/nixos/modules/config/i18n.nix +++ b/nixos/modules/config/i18n.nix @@ -69,6 +69,7 @@ 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") @@ -82,21 +83,6 @@ ++ (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"