Skip to content

Commit 8ab3881

Browse files
committed
use system certs
1 parent 2c203fd commit 8ab3881

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

install-nix.sh

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ add_config() {
1919
}
2020
# Set jobs to number of cores
2121
add_config "max-jobs = auto"
22+
if [[ $OSTYPE =~ darwin ]]; then
23+
add_config "ssl-cert-file = /etc/ssl/cert.pem"
24+
fi
2225
# Allow binary caches for user
2326
add_config "trusted-users = root ${USER:-}"
2427
# Add github access token
@@ -78,14 +81,6 @@ done
7881

7982
sh "$workdir/install" "${installer_options[@]}"
8083

81-
if [[ $OSTYPE =~ darwin ]]; then
82-
# macOS needs certificates hints
83-
cert_file=/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt
84-
echo "NIX_SSL_CERT_FILE=$cert_file" >> "$GITHUB_ENV"
85-
export NIX_SSL_CERT_FILE=$cert_file
86-
sudo launchctl setenv NIX_SSL_CERT_FILE "$cert_file"
87-
fi
88-
8984
# Set paths
9085
echo "/nix/var/nix/profiles/default/bin" >> "$GITHUB_PATH"
9186
# new path for nix 2.14

0 commit comments

Comments
 (0)