mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 05:56:15 +02:00
Update cacert locations
This commit is contained in:
parent
7d148ad543
commit
bf8cc4e9b6
2 changed files with 9 additions and 5 deletions
|
@ -75,7 +75,7 @@ fi
|
||||||
# Install an SSL certificate bundle.
|
# Install an SSL certificate bundle.
|
||||||
if [ -z "$SSL_CERT_FILE" -o ! -f "$SSL_CERT_FILE" ]; then
|
if [ -z "$SSL_CERT_FILE" -o ! -f "$SSL_CERT_FILE" ]; then
|
||||||
$nix/bin/nix-env -i "$cacert"
|
$nix/bin/nix-env -i "$cacert"
|
||||||
export SSL_CERT_FILE="$HOME/.nix-profile/etc/ca-bundle.crt"
|
export SSL_CERT_FILE="$HOME/.nix-profile/etc/ssl/certs/ca-bundle.crt"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Subscribe the user to the Nixpkgs channel and fetch it.
|
# Subscribe the user to the Nixpkgs channel and fetch it.
|
||||||
|
|
|
@ -22,11 +22,15 @@ if [ -n "$HOME" ]; then
|
||||||
export NIX_PATH=${NIX_PATH:+$NIX_PATH:}nixpkgs=$HOME/.nix-defexpr/channels/nixpkgs
|
export NIX_PATH=${NIX_PATH:+$NIX_PATH:}nixpkgs=$HOME/.nix-defexpr/channels/nixpkgs
|
||||||
|
|
||||||
# Set $SSL_CERT_FILE so that Nixpkgs applications like curl work.
|
# Set $SSL_CERT_FILE so that Nixpkgs applications like curl work.
|
||||||
if [ -e /etc/ssl/certs/ca-bundle.crt ]; then # Fedora, NixOS
|
if [ -e /etc/ssl/certs/ca-certificates.crt ]; then # NixOS, Ubuntu, Debian, Gentoo, Arch
|
||||||
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
|
export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
|
||||||
elif [ -e "$NIX_LINK/etc/ca-bundle.crt" ]; then # fall back to Nix profile
|
elif [ -e /etc/ssl/certs/ca-bundle.crt ]; then # Old NixOS
|
||||||
|
export SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt
|
||||||
|
elif [ -e /etc/pki/tls/certs/ca-bundle.crt ]; then # Fedora, CentOS
|
||||||
|
export SSL_CERT_FILE=/etc/pki/tls/certs/ca-bundle.crt
|
||||||
|
elif [ -e "$NIX_LINK/etc/ssl/certs/ca-bundle.crt" ]; then # fall back to cacert in Nix profile
|
||||||
|
export SSL_CERT_FILE="$NIX_LINK/etc/ssl/certs/ca-bundle.crt"
|
||||||
|
elif [ -e "$NIX_LINK/etc/ca-bundle.crt" ]; then # old cacert in Nix profile
|
||||||
export SSL_CERT_FILE="$NIX_LINK/etc/ca-bundle.crt"
|
export SSL_CERT_FILE="$NIX_LINK/etc/ca-bundle.crt"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue