* Set the CD volume ID and the ISO filename.
svn path=/nixos/branches/modular-nixos/; revision=15912
This commit is contained in:
parent
803d8b646f
commit
ba43b5d000
@ -4,6 +4,18 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
|
options = {
|
||||||
|
|
||||||
|
system.nixosVersion = pkgs.lib.mkOption {
|
||||||
|
default = "${builtins.readFile ../../../VERSION}";
|
||||||
|
description = ''
|
||||||
|
NixOS version number.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
# We need a copy of the Nix expressions for Nixpkgs and NixOS on the
|
# 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
|
# 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
|
# files from a slow device like a CD-ROM takes too long. !!! Once
|
||||||
@ -25,11 +37,17 @@ in
|
|||||||
|
|
||||||
{
|
{
|
||||||
require =
|
require =
|
||||||
[ ./iso-image.nix
|
[ options
|
||||||
|
./iso-image.nix
|
||||||
./memtest.nix
|
./memtest.nix
|
||||||
../../../hardware/network/intel-3945abg.nix
|
../../../hardware/network/intel-3945abg.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# ISO naming.
|
||||||
|
isoImage.isoName = "nixos-${config.system.nixosVersion}-${pkgs.stdenv.system}.iso";
|
||||||
|
|
||||||
|
isoImage.volumeID = "NIXOS_INSTALLATION_CD_${config.system.nixosVersion}";
|
||||||
|
|
||||||
# Use Linux 2.6.29.
|
# Use Linux 2.6.29.
|
||||||
boot.kernelPackages = pkgs.kernelPackages_2_6_29;
|
boot.kernelPackages = pkgs.kernelPackages_2_6_29;
|
||||||
|
|
||||||
|
@ -8,6 +8,30 @@ let
|
|||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
|
||||||
|
isoImage.isoName = pkgs.lib.mkOption {
|
||||||
|
default = "cd.iso";
|
||||||
|
description = ''
|
||||||
|
Name of the generated ISO image file.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
isoImage.compressImage = pkgs.lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Whether the ISO image should be compressed using
|
||||||
|
<command>bzip2</command>.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
isoImage.volumeID = pkgs.lib.mkOption {
|
||||||
|
default = "NIXOS_BOOT_CD";
|
||||||
|
description = ''
|
||||||
|
Specifies the label or volume ID of the generated ISO image.
|
||||||
|
Note that the label is used by stage 1 of the boot process to
|
||||||
|
mount the CD, so it should be reasonably distinctive.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
isoImage.contents = pkgs.lib.mkOption {
|
isoImage.contents = pkgs.lib.mkOption {
|
||||||
example =
|
example =
|
||||||
[ { source = pkgs.memtest86 + "/memtest.bin";
|
[ { source = pkgs.memtest86 + "/memtest.bin";
|
||||||
@ -34,8 +58,6 @@ let
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
cdLabel = "NIXOS_INSTALLATION_CD";
|
|
||||||
|
|
||||||
# The configuration file for Grub.
|
# The configuration file for Grub.
|
||||||
grubCfg =
|
grubCfg =
|
||||||
@ -56,7 +78,7 @@ in
|
|||||||
# so that we don't need to know its device.
|
# so that we don't need to know its device.
|
||||||
fileSystems =
|
fileSystems =
|
||||||
[ { mountPoint = "/";
|
[ { mountPoint = "/";
|
||||||
label = cdLabel;
|
label = config.isoImage.volumeID;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -115,17 +137,11 @@ in
|
|||||||
# Create the ISO image.
|
# Create the ISO image.
|
||||||
system.build.isoImage = import ../../../lib/make-iso9660-image.nix {
|
system.build.isoImage = import ../../../lib/make-iso9660-image.nix {
|
||||||
inherit (pkgs) stdenv perl cdrkit pathsFromGraph;
|
inherit (pkgs) stdenv perl cdrkit pathsFromGraph;
|
||||||
#isoName = "${relName}-${platform}.iso";
|
|
||||||
|
inherit (config.isoImage) isoName compressImage volumeID contents storeContents;
|
||||||
|
|
||||||
bootable = true;
|
bootable = true;
|
||||||
bootImage = "/boot/grub/stage2_eltorito";
|
bootImage = "/boot/grub/stage2_eltorito";
|
||||||
|
|
||||||
#compressImage = ...;
|
|
||||||
|
|
||||||
volumeID = cdLabel;
|
|
||||||
|
|
||||||
contents = config.isoImage.contents;
|
|
||||||
storeContents = config.isoImage.storeContents;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# After booting, register the contents of the Nix store on the CD in
|
# After booting, register the contents of the Nix store on the CD in
|
||||||
|
Loading…
x
Reference in New Issue
Block a user