minimal.nix: Get rid of most Glibc locales

This cuts ~100 MB from the system closure.

Issue #7117.
This commit is contained in:
Eelco Dolstra 2015-04-19 22:45:08 +02:00
parent bad3211893
commit 650492c5c8
2 changed files with 9 additions and 3 deletions

View File

@ -74,14 +74,17 @@ in
config = {
environment.systemPackages = [ glibcLocales ];
environment.systemPackages =
optional (config.i18n.supportedLocales != []) glibcLocales;
environment.sessionVariables =
{ LANG = config.i18n.defaultLocale;
LOCALE_ARCHIVE = "/run/current-system/sw/lib/locale/locale-archive";
};
systemd.globalEnvironment.LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive";
systemd.globalEnvironment = mkIf (config.i18n.supportedLocales != []) {
LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive";
};
# /etc/locale.conf is used by systemd.
environment.etc = singleton

View File

@ -3,6 +3,9 @@
{ config, lib, pkgs, ... }:
with lib;
{
environment.noXlibs = true;
environment.noXlibs = mkDefault true;
i18n.supportedLocales = [ config.i18n.defaultLocale ];
}