mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
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
4 changed files with 25 additions and 3 deletions
|
@ -88,9 +88,13 @@ EOF
|
||||||
|
|
||||||
# Add all generations of the system profile to the menu, in reverse
|
# Add all generations of the system profile to the menu, in reverse
|
||||||
# (most recent to least recent) order.
|
# (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 $(
|
for generation in $(
|
||||||
(cd $default/fine-tune && ls -d *) \
|
|
||||||
| sort -n) $(
|
|
||||||
(cd /nix/var/nix/profiles && ls -d system-*-link) \
|
(cd /nix/var/nix/profiles && ls -d system-*-link) \
|
||||||
| sed 's/system-\([0-9]\+\)-link/\1/' \
|
| sed 's/system-\([0-9]\+\)-link/\1/' \
|
||||||
| sort -n -r); do
|
| 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.diffutils
|
||||||
pkgs.upstart # for initctl
|
pkgs.upstart # for initctl
|
||||||
];
|
];
|
||||||
|
children = map (x: ((import ./system.nix)
|
||||||
|
{inherit platform stage2Init; configuration = x;}).system)
|
||||||
|
config.nesting.children;
|
||||||
configurationName = config.boot.configurationName;
|
configurationName = config.boot.configurationName;
|
||||||
}) (pkgs.getConfig ["checkConfigurationOptions"] false)
|
}) (pkgs.getConfig ["checkConfigurationOptions"] false)
|
||||||
optionDeclarations configuration ;
|
optionDeclarations configuration ;
|
||||||
|
|
|
@ -14,6 +14,13 @@ ln -s $upstart $out/upstart
|
||||||
echo "$kernelParams" > $out/kernel-params
|
echo "$kernelParams" > $out/kernel-params
|
||||||
echo "$configurationName" > $out/configuration-name
|
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
|
cat > $out/menu.lst << GRUBEND
|
||||||
kernel $kernel init=$bootStage2 $kernelParams
|
kernel $kernel init=$bootStage2 $kernelParams
|
||||||
initrd $initrd
|
initrd $initrd
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue