* Include only the en_US locale on the CD. This saves 75 MiB or so.
svn path=/nixos/branches/modular-nixos/; revision=15883
This commit is contained in:
parent
dbe229f3aa
commit
eb8b534173
@ -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 {
|
consoleFont = mkOption {
|
||||||
default = "lat9w-16";
|
default = "lat9w-16";
|
||||||
example = "LatArCyrHeb-16";
|
example = "LatArCyrHeb-16";
|
||||||
@ -39,8 +51,23 @@ in
|
|||||||
|
|
||||||
###### implementation
|
###### implementation
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
glibcLocales = pkgs.glibcLocales.override {
|
||||||
|
allLocales = pkgs.lib.any (x: x == "all") config.i18n.supportedLocales;
|
||||||
|
locales = config.i18n.supportedLocales;
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
require = [
|
require = options;
|
||||||
options
|
|
||||||
];
|
environment.systemPackages = [glibcLocales];
|
||||||
|
|
||||||
|
environment.shellInit =
|
||||||
|
''
|
||||||
|
export LANG=${config.i18n.defaultLocale}
|
||||||
|
export LOCALE_ARCHIVE=/var/run/current-system/sw/lib/locale/locale-archive
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,6 @@ let
|
|||||||
pkgs.e2fsprogs
|
pkgs.e2fsprogs
|
||||||
pkgs.findutils
|
pkgs.findutils
|
||||||
pkgs.glibc # for ldd, getent
|
pkgs.glibc # for ldd, getent
|
||||||
pkgs.glibcLocales
|
|
||||||
pkgs.gnugrep
|
pkgs.gnugrep
|
||||||
pkgs.gnused
|
pkgs.gnused
|
||||||
pkgs.gnutar
|
pkgs.gnutar
|
||||||
|
@ -18,6 +18,10 @@
|
|||||||
# Disable some other stuff we don't need.
|
# Disable some other stuff we don't need.
|
||||||
security.sudo.enable = false;
|
security.sudo.enable = false;
|
||||||
|
|
||||||
|
# Include only the en_US locale. This saves 75 MiB or so compared to
|
||||||
|
# the full glibcLocales package.
|
||||||
|
i18n.supportedLocales = ["en_US.UTF-8/UTF-8" "en_US/ISO-8859-1"];
|
||||||
|
|
||||||
# Include some utilities that are useful for installing or repairing
|
# Include some utilities that are useful for installing or repairing
|
||||||
# the system.
|
# the system.
|
||||||
environment.systemPackages =
|
environment.systemPackages =
|
||||||
@ -77,4 +81,20 @@
|
|||||||
# nixos-install will do a pull from this channel to speed up the
|
# nixos-install will do a pull from this channel to speed up the
|
||||||
# installation.
|
# installation.
|
||||||
installer.nixpkgsURL = http://nixos.org/releases/nixpkgs/channels/nixpkgs-unstable;
|
installer.nixpkgsURL = http://nixos.org/releases/nixpkgs/channels/nixpkgs-unstable;
|
||||||
|
|
||||||
|
# Provide the NixOS/Nixpkgs sources in /etc/nixos. This is required
|
||||||
|
# for nixos-install.
|
||||||
|
boot.postBootCommands =
|
||||||
|
''
|
||||||
|
export PATH=${pkgs.gnutar}/bin:${pkgs.bzip2}/bin:$PATH
|
||||||
|
|
||||||
|
mkdir -p /mnt
|
||||||
|
|
||||||
|
echo "unpacking the NixOS/Nixpkgs sources..."
|
||||||
|
mkdir -p /etc/nixos/nixos
|
||||||
|
tar xjf /install/nixos.tar.bz2 -C /etc/nixos/nixos
|
||||||
|
mkdir -p /etc/nixos/nixpkgs
|
||||||
|
tar xjf /install/nixpkgs.tar.bz2 -C /etc/nixos/nixpkgs
|
||||||
|
chown -R root.root /etc/nixos
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,6 @@ in
|
|||||||
systemPath = config.system.path;
|
systemPath = config.system.path;
|
||||||
wrapperDir = config.security.wrapperDir;
|
wrapperDir = config.security.wrapperDir;
|
||||||
modulesTree = config.system.modulesTree;
|
modulesTree = config.system.modulesTree;
|
||||||
defaultLocale = config.i18n.defaultLocale;
|
|
||||||
shellInit = config.environment.shellInit;
|
shellInit = config.environment.shellInit;
|
||||||
};
|
};
|
||||||
target = "bashrc";
|
target = "bashrc";
|
||||||
|
@ -5,11 +5,8 @@ export MODULE_DIR=@modulesTree@/lib/modules
|
|||||||
export NIXPKGS_CONFIG=/nix/etc/config.nix
|
export NIXPKGS_CONFIG=/nix/etc/config.nix
|
||||||
export NIXPKGS_ALL=/etc/nixos/nixpkgs
|
export NIXPKGS_ALL=/etc/nixos/nixpkgs
|
||||||
export PAGER="less -R"
|
export PAGER="less -R"
|
||||||
export LANG=@defaultLocale@
|
|
||||||
export EDITOR=nano
|
export EDITOR=nano
|
||||||
export INFOPATH=/var/run/current-system/sw/info:/var/run/current-system/sw/share/info
|
|
||||||
export LOCATE_PATH=/var/cache/locatedb
|
export LOCATE_PATH=/var/cache/locatedb
|
||||||
export LOCALE_ARCHIVE=/var/run/current-system/sw/lib/locale/locale-archive
|
|
||||||
@shellInit@
|
@shellInit@
|
||||||
|
|
||||||
|
|
||||||
|
@ -33,4 +33,9 @@ in
|
|||||||
|
|
||||||
{
|
{
|
||||||
environment.systemPackages = [infoWrapper];
|
environment.systemPackages = [infoWrapper];
|
||||||
|
|
||||||
|
environment.shellInit =
|
||||||
|
''
|
||||||
|
export INFOPATH=/var/run/current-system/sw/info:/var/run/current-system/sw/share/info
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user