* Include the NixOS/Nixpkgs trees on the CD.
svn path=/nixos/branches/modular-nixos/; revision=15897
This commit is contained in:
parent
b7cad3c059
commit
ca061eb628
@ -2,9 +2,33 @@
|
||||
|
||||
{config, pkgs, ...}:
|
||||
|
||||
let
|
||||
|
||||
# We need a copy of the Nix expressions for Nixpkgs and NixOS on the
|
||||
# CD. We put them in a tarball because accessing that many small
|
||||
# files from a slow device like a CD-ROM takes too long. !!! Once
|
||||
# we use squashfs, maybe we won't need this anymore.
|
||||
makeTarball = tarName: input: pkgs.runCommand "tarball" {inherit tarName;}
|
||||
''
|
||||
ensureDir $out
|
||||
(cd ${input} && tar cvfj $out/${tarName} . \
|
||||
--exclude '*~' --exclude 'result')
|
||||
'';
|
||||
|
||||
# Put the current directory in a tarball.
|
||||
nixosTarball = makeTarball "nixos.tar.bz2" (pkgs.lib.cleanSource ../../..);
|
||||
|
||||
# Put Nixpkgs in a tarball.
|
||||
nixpkgsTarball = makeTarball "nixpkgs.tar.bz2" (pkgs.lib.cleanSource pkgs.path);
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
require = [./iso-image.nix];
|
||||
|
||||
# Use Linux 2.6.29.
|
||||
boot.kernelPackages = pkgs.kernelPackages_2_6_29;
|
||||
|
||||
# Don't include X libraries.
|
||||
services.sshd.forwardX11 = false;
|
||||
fonts.enableFontConfig = false;
|
||||
@ -92,9 +116,11 @@
|
||||
|
||||
echo "unpacking the NixOS/Nixpkgs sources..."
|
||||
mkdir -p /etc/nixos/nixos
|
||||
tar xjf /install/nixos.tar.bz2 -C /etc/nixos/nixos
|
||||
tar xjf ${nixosTarball}/nixos.tar.bz2 -C /etc/nixos/nixos
|
||||
mkdir -p /etc/nixos/nixpkgs
|
||||
tar xjf /install/nixpkgs.tar.bz2 -C /etc/nixos/nixpkgs
|
||||
tar xjf ${nixpkgsTarball}/nixpkgs.tar.bz2 -C /etc/nixos/nixpkgs
|
||||
chown -R root.root /etc/nixos
|
||||
'';
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user