Now automated test runs - installs and boots NixOS - on my computer. Some minor issue with socat transferring report from virtual machine to host, though.
svn path=/nixos/trunk/; revision=12830
This commit is contained in:
parent
88be528d9d
commit
f03fed54e0
@ -66,4 +66,8 @@ in
|
|||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
nix = pkgs: pkgs.nixCustomFun (pkgs.nixUnstable.src)
|
||||||
|
""
|
||||||
|
["nix-reduce-build" "nix-http-export.cgi"]
|
||||||
|
["--with-docbook-xsl=\\\${pkgs.docbook5_xsl}/xml/xsl/docbook/"];
|
||||||
}).rescueCD
|
}).rescueCD
|
||||||
|
@ -14,7 +14,7 @@ mkdir -p /mnt/etc/nixos
|
|||||||
|
|
||||||
cat > /mnt/etc/nixos/configuration.nix <<EOF
|
cat > /mnt/etc/nixos/configuration.nix <<EOF
|
||||||
|
|
||||||
{
|
pkgs: full_configuration: {
|
||||||
boot = {
|
boot = {
|
||||||
grubDevice = "/dev/sda";
|
grubDevice = "/dev/sda";
|
||||||
copyKernels = true;
|
copyKernels = true;
|
||||||
@ -67,9 +67,13 @@ cat > /mnt/etc/nixos/configuration.nix <<EOF
|
|||||||
};
|
};
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
extraPackages = pkgs: [
|
extraPackages = [
|
||||||
pkgs.socat
|
pkgs.socat (pkgs.lowPrio pkgs.nixUnstable)
|
||||||
];
|
];
|
||||||
|
nix = pkgs.nixCustomFun (pkgs.nixUnstable.src)
|
||||||
|
""
|
||||||
|
["nix-reduce-build" "nix-http-export.cgi"]
|
||||||
|
["--with-docbook-xsl=\\\${pkgs.docbook5_xsl}/xml/xsl/docbook/"];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ echo "reboot" | ./socat/bin/socat tcp-listen:4424 stdio >> report &
|
|||||||
if ( ! [ -d dvd/iso ] ) || ( [ -z "$USE_LEFTOVER_DVD" ] ); then
|
if ( ! [ -d dvd/iso ] ) || ( [ -z "$USE_LEFTOVER_DVD" ] ); then
|
||||||
rm dvd
|
rm dvd
|
||||||
# unset NIXPKGS_CONFIG to reduce host -> image configuration leak
|
# unset NIXPKGS_CONFIG to reduce host -> image configuration leak
|
||||||
NIXPKGS_CONFIG= nix-build -o dvd /etc/nixos/nixos/configuration/closed-install.nix ||
|
NIXPKGS_CONFIG= nix-build -o dvd /etc/nixos/nixos/installer/cd-dvd/closed-install.nix ||
|
||||||
{ echo "Failed to build LiveDVD" >&2 ; exit 2; };
|
{ echo "Failed to build LiveDVD" >&2 ; exit 2; };
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ if ( ! [ -f install-test.img ] ) || ( [ -z "$JUST_BOOT" ] ); then
|
|||||||
) | ssh -l root -i /var/certs/ssh/id_livedvd -o StrictHostKeyChecking=no 127.0.0.1 -p 4425
|
) | ssh -l root -i /var/certs/ssh/id_livedvd -o StrictHostKeyChecking=no 127.0.0.1 -p 4425
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
./qemu/bin/qemu --kernel-kqemu -m 512 install-test.img -no-reboot
|
./qemu/bin/qemu --kernel-kqemu -m 128 install-test.img -no-reboot
|
||||||
|
|
||||||
echo "Report contains: "
|
echo "Report contains: "
|
||||||
cat report
|
cat report
|
||||||
|
@ -40,14 +40,16 @@
|
|||||||
*/
|
*/
|
||||||
,additionalFiles ? []
|
,additionalFiles ? []
|
||||||
,compressImage ? false
|
,compressImage ? false
|
||||||
,nixpkgsPath ? ../../nixpkgs
|
,nixpkgsPath ? ../../../nixpkgs
|
||||||
,additionalJobs ? []
|
,additionalJobs ? []
|
||||||
,intel3945FWEnable ? false
|
,intel3945FWEnable ? true
|
||||||
|
,intel4965FWEnable ? true
|
||||||
,cdLabel ? "NIXOS_INSTALLATION_CD"
|
,cdLabel ? "NIXOS_INSTALLATION_CD"
|
||||||
,relName ?
|
,relName ?
|
||||||
if builtins.pathExists ../../relname
|
if builtins.pathExists ../../relname
|
||||||
then builtins.readFile ../../relname
|
then builtins.readFile ../../relname
|
||||||
else "nixos-${builtins.readFile ../../VERSION}"
|
else "nixos-${builtins.readFile ../../VERSION}"
|
||||||
|
,nix ? pkgs: pkgs.nix
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
realLib = if lib != null then lib else (import (nixpkgsPath+"/pkgs/lib"));
|
realLib = if lib != null then lib else (import (nixpkgsPath+"/pkgs/lib"));
|
||||||
@ -151,6 +153,7 @@ rec {
|
|||||||
kernelModules = bootKernelModules;
|
kernelModules = bootKernelModules;
|
||||||
extraModulePackages = ((extraModulePackages pkgs)
|
extraModulePackages = ((extraModulePackages pkgs)
|
||||||
++(if aufs then [(kernelPackages pkgs).aufs] else [])
|
++(if aufs then [(kernelPackages pkgs).aufs] else [])
|
||||||
|
++(pkgs.lib.optional intel3945FWEnable (kernelPackages pkgs).iwlwifi)
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -160,6 +163,13 @@ rec {
|
|||||||
|
|
||||||
xserver = { enable = false; };
|
xserver = { enable = false; };
|
||||||
|
|
||||||
|
udev = {
|
||||||
|
addFirmware = []
|
||||||
|
++ (pkgs.lib.optional intel3945FWEnable pkgs.iwlwifi3945ucode)
|
||||||
|
++ (pkgs.lib.optional intel4965FWEnable pkgs.iwlwifi4965ucode)
|
||||||
|
;
|
||||||
|
};
|
||||||
|
|
||||||
extraJobs = [
|
extraJobs = [
|
||||||
# Unpack the NixOS/Nixpkgs sources to /etc/nixos.
|
# Unpack the NixOS/Nixpkgs sources to /etc/nixos.
|
||||||
{
|
{
|
||||||
@ -314,6 +324,7 @@ rec {
|
|||||||
] ++ (packages pkgs);
|
] ++ (packages pkgs);
|
||||||
checkConfigurationOptions = true;
|
checkConfigurationOptions = true;
|
||||||
cleanStart = cleanStart;
|
cleanStart = cleanStart;
|
||||||
|
nix = nix pkgs;
|
||||||
};
|
};
|
||||||
|
|
||||||
users = {
|
users = {
|
||||||
@ -326,10 +337,6 @@ rec {
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
networking = {
|
|
||||||
enableIntel3945ABGFirmware = intel3945FWEnable;
|
|
||||||
};
|
|
||||||
|
|
||||||
}; in preConfiguration // (arbitraryOverrides preConfiguration);
|
}; in preConfiguration // (arbitraryOverrides preConfiguration);
|
||||||
|
|
||||||
configurations = [{
|
configurations = [{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user