nixos-install: Pass CA cert bundle to chroot.

Since we're using HTTPS for the binary cache (introduced in faf0797) by
default, the binary cache should also be available during installation.

The file that is defined in SSL_CERT_FILE outside of the chroot is
copied over to /tmp/ca-cert.crt inside the chroot, so we have an
absolute path we can reference during nixos-install. However, this might
end up with the file not being cleaned up properly from outside of the
store, but neither would be /tmp/root so the cleanup issue needs to be
solved in another place (or commit to be more exact).

Signed-off-by: aszlig <aszlig@redmoonstudios.org>

aszlig cf7f15c9 f2e20fa8

+6
+6
nixos/modules/installer/tools/nixos-install.sh
··· 89 rm -f $mountPoint/etc/{resolv.conf,hosts} 90 cp -Lf /etc/resolv.conf /etc/hosts $mountPoint/etc/ 91 92 93 if [ -n "$runChroot" ]; then 94 if ! [ -L $mountPoint/nix/var/nix/profiles/system ]; then
··· 89 rm -f $mountPoint/etc/{resolv.conf,hosts} 90 cp -Lf /etc/resolv.conf /etc/hosts $mountPoint/etc/ 91 92 + if [ -e "$SSL_CERT_FILE" ]; then 93 + cp -Lf "$SSL_CERT_FILE" "$mountPoint/tmp/ca-cert.crt" 94 + export SSL_CERT_FILE=/tmp/ca-cert.crt 95 + # For Nix 1.7 96 + export CURL_CA_BUNDLE=/tmp/ca-cert.crt 97 + fi 98 99 if [ -n "$runChroot" ]; then 100 if ! [ -L $mountPoint/nix/var/nix/profiles/system ]; then