diff options
author | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2022-06-11 19:56:12 +0200 |
---|---|---|
committer | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2022-06-11 23:29:29 +0200 |
commit | 515b36c0939b2fd96072eef7e58722900218897b (patch) | |
tree | 3a565a8ce38589bcbd277a3f477e1faa1d21822a /nixos | |
parent | b03082ac7986809ae792dbf1c592ecd45c513ec8 (diff) |
nixos/i18n: don't build all supportedLocales by default
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/doc/manual/from_md/release-notes/rl-2211.section.xml | 10 | ||||
-rw-r--r-- | nixos/doc/manual/release-notes/rl-2211.section.md | 4 | ||||
-rw-r--r-- | nixos/modules/config/i18n.nix | 3 | ||||
-rw-r--r-- | nixos/modules/profiles/minimal.nix | 3 |
4 files changed, 16 insertions, 4 deletions
diff --git a/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml index 5219c1329e362..a00cb34b9c495 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml @@ -95,6 +95,16 @@ </listitem> <listitem> <para> + <literal>i18n.supportedLocales</literal> is now by default + only generated with the default locale set in + <literal>i18n.defaultLocale</literal>. This got copied over + from the minimal profile and reduces the final system size by + 200MB. If you require all locales installed set the option to + <literal>[ "all" ]</literal>. + </para> + </listitem> + <listitem> + <para> The <literal>isPowerPC</literal> predicate, found on <literal>platform</literal> attrsets (<literal>hostPlatform</literal>, diff --git a/nixos/doc/manual/release-notes/rl-2211.section.md b/nixos/doc/manual/release-notes/rl-2211.section.md index 0f04eff7c0459..244c6f0901f86 100644 --- a/nixos/doc/manual/release-notes/rl-2211.section.md +++ b/nixos/doc/manual/release-notes/rl-2211.section.md @@ -43,6 +43,10 @@ In addition to numerous new and upgraded packages, this release has the followin `lib.systems.parse.isCompatible` still exists, but has changed semantically: Architectures with differing endianness modes are *no longer considered compatible*. +- `i18n.supportedLocales` is now by default only generated with the default locale set in `i18n.defaultLocale`. + This got copied over from the minimal profile and reduces the final system size by 200MB. + If you require all locales installed set the option to ``[ "all" ]``. + - The `isPowerPC` predicate, found on `platform` attrsets (`hostPlatform`, `buildPlatform`, `targetPlatform`, etc) has been removed in order to reduce confusion. The predicate was was defined such that it matches only the 32-bit big-endian members of the POWER/PowerPC family, despite having a name which would imply a broader set of systems. If you were using this predicate, you can replace `foo.isPowerPC` with `(with foo; isPower && is32bit && isBigEndian)`. - PHP 7.4 is no longer supported due to upstream not supporting this diff --git a/nixos/modules/config/i18n.nix b/nixos/modules/config/i18n.nix index 5b8d5b214496b..53dd325457e01 100644 --- a/nixos/modules/config/i18n.nix +++ b/nixos/modules/config/i18n.nix @@ -53,7 +53,8 @@ with lib; supportedLocales = mkOption { type = types.listOf types.str; - default = ["all"]; + default = [ (config.i18n.defaultLocale + "/UTF-8") ]; + defaultText = literalExpression "[ (config.i18n.defaultLocale + \"/UTF-8\") ]"; 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 diff --git a/nixos/modules/profiles/minimal.nix b/nixos/modules/profiles/minimal.nix index e79b927238419..0e65989214a18 100644 --- a/nixos/modules/profiles/minimal.nix +++ b/nixos/modules/profiles/minimal.nix @@ -8,9 +8,6 @@ with lib; { environment.noXlibs = mkDefault true; - # This isn't perfect, but let's expect the user specifies an UTF-8 defaultLocale - i18n.supportedLocales = [ (config.i18n.defaultLocale + "/UTF-8") ]; - documentation.enable = mkDefault false; documentation.nixos.enable = mkDefault false; |