* nixos-rebuild: do a nix-pull on the Nixpkgs channel manifest. I.e., you
don't need to be subscribed to the Nixpkgs channel to get binary downloads. This is possible because nix-pull is now pretty fast. svn path=/nixos/trunk/; revision=9133
This commit is contained in:
parent
cc4d0d118a
commit
ad22e587ab
@ -28,6 +28,19 @@ if test -z "$NIXOS"; then NIXOS=/etc/nixos/nixos; fi
|
|||||||
if test -z "$NIXOS_CONFIG"; then NIXOS_CONFIG=/etc/nixos/configuration.nix; fi
|
if test -z "$NIXOS_CONFIG"; then NIXOS_CONFIG=/etc/nixos/configuration.nix; fi
|
||||||
|
|
||||||
|
|
||||||
|
# Pull the manifests defined in the configuration (the "manifests"
|
||||||
|
# attribute). Wonderfully hacky.
|
||||||
|
manifests=$(nix-instantiate --eval-only --xml --strict \
|
||||||
|
$NIXOS/system/system.nix \
|
||||||
|
--arg configuration "import $NIXOS_CONFIG" \
|
||||||
|
-A manifests \
|
||||||
|
| grep '<string' | sed 's^.*"\(.*\)".*^\1^g')
|
||||||
|
|
||||||
|
for i in $manifests; do
|
||||||
|
NIX_DOWNLOAD_CACHE=/nix/var/nix/channel-cache nix-pull $i || true
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
# Either upgrade the configuration in the system profile (for "switch"
|
# Either upgrade the configuration in the system profile (for "switch"
|
||||||
# or "boot"), or just build it and create a symlink "result" in the
|
# or "boot"), or just build it and create a symlink "result" in the
|
||||||
# current directory (for "build" and "test").
|
# current directory (for "build" and "test").
|
||||||
|
@ -909,6 +909,20 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
name = ["installer" "manifests"];
|
||||||
|
default = [http://nix.cs.uu.nl/dist/nix/channels-v3/nixpkgs-unstable/MANIFEST];
|
||||||
|
example =
|
||||||
|
[ http://nix.cs.uu.nl/dist/nix/channels-v3/nixpkgs-unstable/MANIFEST
|
||||||
|
http://nix.cs.uu.nl/dist/nix/channels-v3/nixpkgs-stable/MANIFEST
|
||||||
|
];
|
||||||
|
description = "
|
||||||
|
URLs of manifests to be downloaded when you run
|
||||||
|
<command>nixos-rebuild</command> to speed up builds.
|
||||||
|
";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
name = ["nix" "maxJobs"];
|
name = ["nix" "maxJobs"];
|
||||||
default = 1;
|
default = 1;
|
||||||
|
@ -27,6 +27,8 @@ rec {
|
|||||||
allPackages = import ../pkgs/top-level/all-packages.nix;
|
allPackages = import ../pkgs/top-level/all-packages.nix;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
manifests = config.get ["installer" "manifests"]; # exported here because nixos-rebuild uses it
|
||||||
|
|
||||||
nix = pkgs.nixUnstable; # we need the exportReferencesGraph feature
|
nix = pkgs.nixUnstable; # we need the exportReferencesGraph feature
|
||||||
|
|
||||||
useKernel = (config.get ["boot" "useKernel"]) pkgs;
|
useKernel = (config.get ["boot" "useKernel"]) pkgs;
|
||||||
|
@ -10,6 +10,7 @@ let
|
|||||||
plugScript = writeScript "ifplugd.action" "#! ${bash}/bin/sh
|
plugScript = writeScript "ifplugd.action" "#! ${bash}/bin/sh
|
||||||
if test \"$2\" = up; then
|
if test \"$2\" = up; then
|
||||||
initctl stop dhclient
|
initctl stop dhclient
|
||||||
|
sleep 1
|
||||||
initctl start dhclient
|
initctl start dhclient
|
||||||
fi
|
fi
|
||||||
";
|
";
|
||||||
|
Loading…
Reference in New Issue
Block a user