nixos-install: fix SSL certificate error
This commit is contained in:
parent
ca38376566
commit
1193790b95
|
@ -91,12 +91,10 @@ ln -s /run $mountPoint/var/run
|
||||||
rm -f $mountPoint/etc/{resolv.conf,hosts}
|
rm -f $mountPoint/etc/{resolv.conf,hosts}
|
||||||
cp -Lf /etc/resolv.conf /etc/hosts $mountPoint/etc/
|
cp -Lf /etc/resolv.conf /etc/hosts $mountPoint/etc/
|
||||||
|
|
||||||
if [ -e "$SSL_CERT_FILE" ]; then
|
cp -Lf "@cacert@" "$mountPoint/tmp/ca-cert.crt"
|
||||||
cp -Lf "$SSL_CERT_FILE" "$mountPoint/tmp/ca-cert.crt"
|
|
||||||
export SSL_CERT_FILE=/tmp/ca-cert.crt
|
export SSL_CERT_FILE=/tmp/ca-cert.crt
|
||||||
# For Nix 1.7
|
# For Nix 1.7
|
||||||
export CURL_CA_BUNDLE=/tmp/ca-cert.crt
|
export CURL_CA_BUNDLE=/tmp/ca-cert.crt
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$runChroot" ]; then
|
if [ -n "$runChroot" ]; then
|
||||||
if ! [ -L $mountPoint/nix/var/nix/profiles/system ]; then
|
if ! [ -L $mountPoint/nix/var/nix/profiles/system ]; then
|
||||||
|
|
|
@ -23,6 +23,7 @@ let
|
||||||
|
|
||||||
inherit (pkgs) perl pathsFromGraph;
|
inherit (pkgs) perl pathsFromGraph;
|
||||||
nix = config.nix.package.out;
|
nix = config.nix.package.out;
|
||||||
|
cacert = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
|
||||||
|
|
||||||
nixClosure = pkgs.runCommand "closure"
|
nixClosure = pkgs.runCommand "closure"
|
||||||
{ exportReferencesGraph = ["refs" config.nix.package.out]; }
|
{ exportReferencesGraph = ["refs" config.nix.package.out]; }
|
||||||
|
|
Loading…
Reference in New Issue