Unpack the initial channel only once

This commit is contained in:
Eelco Dolstra 2013-07-02 00:21:56 +02:00
parent 59bab9048a
commit db17b68d81

View File

@ -29,10 +29,14 @@ in
# for nixos-install. # for nixos-install.
boot.postBootCommands = boot.postBootCommands =
'' ''
echo "unpacking the NixOS/Nixpkgs sources..." if ! [ -e /var/lib/nixos/did-channel-init ]; then
mkdir -p /nix/var/nix/profiles/per-user/root echo "unpacking the NixOS/Nixpkgs sources..."
${config.environment.nix}/bin/nix-env -p /nix/var/nix/profiles/per-user/root/channels -i ${channelSources} --quiet mkdir -p /nix/var/nix/profiles/per-user/root
mkdir -m 0700 -p /root/.nix-defexpr ${config.environment.nix}/bin/nix-env -p /nix/var/nix/profiles/per-user/root/channels -i ${channelSources} --quiet
ln -s /nix/var/nix/profiles/per-user/root/channels /root/.nix-defexpr/channels mkdir -m 0700 -p /root/.nix-defexpr
ln -s /nix/var/nix/profiles/per-user/root/channels /root/.nix-defexpr/channels
mkdir -m 0755 -p /var/lib/nixos
touch /var/lib/nixos/did-channel-init
fi
''; '';
} }