Added possibility of building multiple configurations by one nixos-rebuild.
svn path=/nixos/trunk/; revision=9959
This commit is contained in:
parent
6733486ec8
commit
f81bebe2d7
@ -88,9 +88,13 @@ EOF
|
||||
|
||||
# Add all generations of the system profile to the menu, in reverse
|
||||
# (most recent to least recent) order.
|
||||
for link in $(
|
||||
(ls -d $default/fine-tune/* ) \
|
||||
| sort -n); do
|
||||
date=$(stat --printf="%y\n" $link | sed 's/\..*//')
|
||||
addEntry "NixOS - variation" $link ""
|
||||
done
|
||||
for generation in $(
|
||||
(cd $default/fine-tune && ls -d *) \
|
||||
| sort -n) $(
|
||||
(cd /nix/var/nix/profiles && ls -d system-*-link) \
|
||||
| sed 's/system-\([0-9]\+\)-link/\1/' \
|
||||
| sort -n -r); do
|
||||
|
@ -1736,6 +1736,14 @@ root ALL=(ALL) SETENV: ALL
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
nesting = {
|
||||
children = mkOption {
|
||||
default = [];
|
||||
description = "
|
||||
Additional configurations to build.
|
||||
";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -356,6 +356,9 @@ rec {
|
||||
pkgs.diffutils
|
||||
pkgs.upstart # for initctl
|
||||
];
|
||||
children = map (x: ((import ./system.nix)
|
||||
{inherit platform stage2Init; configuration = x;}).system)
|
||||
config.nesting.children;
|
||||
configurationName = config.boot.configurationName;
|
||||
}) (pkgs.getConfig ["checkConfigurationOptions"] false)
|
||||
optionDeclarations configuration ;
|
||||
|
@ -14,6 +14,13 @@ ln -s $upstart $out/upstart
|
||||
echo "$kernelParams" > $out/kernel-params
|
||||
echo "$configurationName" > $out/configuration-name
|
||||
|
||||
mkdir $out/fine-tune
|
||||
ChildCount=0;
|
||||
for i in $children; do
|
||||
ChildCount=$(( ChildCount + 1 ));
|
||||
ln -s $i $out/fine-tune/child-$ChildCount;
|
||||
done
|
||||
|
||||
cat > $out/menu.lst << GRUBEND
|
||||
kernel $kernel init=$bootStage2 $kernelParams
|
||||
initrd $initrd
|
||||
|
Loading…
Reference in New Issue
Block a user