diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2009-06-05 17:19:30 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2009-06-05 17:19:30 +0000 |
commit | eb8b534173511e29c2ca58410b10863a434932a3 (patch) | |
tree | e326ee01c7eb239d4328037062bdfe9463016d22 /modules/config | |
parent | dbe229f3aac983750c405b30c2b487bba765d747 (diff) | |
download | nixpkgs-eb8b534173511e29c2ca58410b10863a434932a3.tar nixpkgs-eb8b534173511e29c2ca58410b10863a434932a3.tar.gz nixpkgs-eb8b534173511e29c2ca58410b10863a434932a3.tar.bz2 nixpkgs-eb8b534173511e29c2ca58410b10863a434932a3.tar.lz nixpkgs-eb8b534173511e29c2ca58410b10863a434932a3.tar.xz nixpkgs-eb8b534173511e29c2ca58410b10863a434932a3.tar.zst nixpkgs-eb8b534173511e29c2ca58410b10863a434932a3.zip |
* Include only the en_US locale on the CD. This saves 75 MiB or so.
svn path=/nixos/branches/modular-nixos/; revision=15883
Diffstat (limited to 'modules/config')
-rw-r--r-- | modules/config/i18n.nix | 33 | ||||
-rw-r--r-- | modules/config/system-path.nix | 1 |
2 files changed, 30 insertions, 4 deletions
diff --git a/modules/config/i18n.nix b/modules/config/i18n.nix index c7a6f1c24d8..744eaee6667 100644 --- a/modules/config/i18n.nix +++ b/modules/config/i18n.nix @@ -16,6 +16,18 @@ let "; }; + supportedLocales = mkOption { + default = ["all"]; + 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 + <literal>"all"</literal> means that all locales supported by + Glibc will be installed. A full list of supported locales + can be found at <link + xlink:href="http://sourceware.org/cgi-bin/cvsweb.cgi/libc/localedata/SUPPORTED?cvsroot=glibc"/>. + ''; + }; + consoleFont = mkOption { default = "lat9w-16"; example = "LatArCyrHeb-16"; @@ -39,8 +51,23 @@ in ###### implementation +let + + glibcLocales = pkgs.glibcLocales.override { + allLocales = pkgs.lib.any (x: x == "all") config.i18n.supportedLocales; + locales = config.i18n.supportedLocales; + }; + +in + { - require = [ - options - ]; + require = options; + + environment.systemPackages = [glibcLocales]; + + environment.shellInit = + '' + export LANG=${config.i18n.defaultLocale} + export LOCALE_ARCHIVE=/var/run/current-system/sw/lib/locale/locale-archive + ''; } diff --git a/modules/config/system-path.nix b/modules/config/system-path.nix index 62fbde95f7f..804b9419a45 100644 --- a/modules/config/system-path.nix +++ b/modules/config/system-path.nix @@ -21,7 +21,6 @@ let pkgs.e2fsprogs pkgs.findutils pkgs.glibc # for ldd, getent - pkgs.glibcLocales pkgs.gnugrep pkgs.gnused pkgs.gnutar |