mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 05:56:15 +02:00
Install cacert before running nix-channel
Also, make it more robust against incorrent SSL_CERT_FILE values.
This commit is contained in:
parent
b77037b8fd
commit
c2a552b075
1 changed files with 6 additions and 5 deletions
|
@ -72,6 +72,12 @@ if ! $nix/bin/nix-env -i "$nix"; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Install an SSL certificate bundle.
|
||||||
|
if [ -z "$SSL_CERT_FILE" -o ! -f "$SSL_CERT_FILE" ]; then
|
||||||
|
$nix/bin/nix-env -i "$cacert"
|
||||||
|
export SSL_CERT_FILE="$HOME/.nix-profile/etc/ca-bundle.crt"
|
||||||
|
fi
|
||||||
|
|
||||||
# Subscribe the user to the Nixpkgs channel and fetch it.
|
# Subscribe the user to the Nixpkgs channel and fetch it.
|
||||||
if ! $nix/bin/nix-channel --list | grep -q "^nixpkgs "; then
|
if ! $nix/bin/nix-channel --list | grep -q "^nixpkgs "; then
|
||||||
$nix/bin/nix-channel --add https://nixos.org/channels/nixpkgs-unstable
|
$nix/bin/nix-channel --add https://nixos.org/channels/nixpkgs-unstable
|
||||||
|
@ -80,11 +86,6 @@ if [ -z "$_NIX_INSTALLER_TEST" ]; then
|
||||||
$nix/bin/nix-channel --update nixpkgs
|
$nix/bin/nix-channel --update nixpkgs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install an SSL certificate bundle.
|
|
||||||
if [ -z "$SSL_CERT_FILE" ]; then
|
|
||||||
$nix/bin/nix-env -i "$cacert"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Make the shell source nix.sh during login.
|
# Make the shell source nix.sh during login.
|
||||||
p=$NIX_LINK/etc/profile.d/nix.sh
|
p=$NIX_LINK/etc/profile.d/nix.sh
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue