nix-profile.sh: Set $SSL_CERT_FILE
This commit is contained in:
parent
13a63b59bb
commit
50ed345fad
1 changed files with 10 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
if test -n "$HOME"; then
|
||||
if [ -n "$HOME" ]; then
|
||||
NIX_LINK="$HOME/.nix-profile"
|
||||
|
||||
# Set the default profile.
|
||||
|
@ -19,4 +19,13 @@ if test -n "$HOME"; then
|
|||
# <nixpkgs> paths work when the user has fetched the Nixpkgs
|
||||
# channel.
|
||||
export NIX_PATH=${NIX_PATH:+$NIX_PATH:}nixpkgs=$HOME/.nix-defexpr/channels/nixpkgs
|
||||
|
||||
# Set $SSL_CERT_FILE so that Nixpkgs applications like curl work.
|
||||
if [ -e /etc/ssl/certs/ca-bundle.crt ]; then # Fedora, NixOS
|
||||
export SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt
|
||||
elif [ -e /etc/ssl/certs/ca-certificates.crt ]; then # Ubuntu, Debian
|
||||
export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
|
||||
elif [ -e "$NIX_LINK/etc/ca-bundle.crt" ]; then # fall back to Nix profile
|
||||
export SSL_CERT_FILE="$NIX_LINK/etc/ca-bundle.crt"
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue