mirror of
https://github.com/cachix/install-nix-action.git
synced 2024-11-21 08:00:53 +00:00
use system certs
This commit is contained in:
parent
2c203fd87b
commit
8ab3881720
1 changed files with 3 additions and 8 deletions
|
@ -19,6 +19,9 @@ add_config() {
|
|||
}
|
||||
# Set jobs to number of cores
|
||||
add_config "max-jobs = auto"
|
||||
if [[ $OSTYPE =~ darwin ]]; then
|
||||
add_config "ssl-cert-file = /etc/ssl/cert.pem"
|
||||
fi
|
||||
# Allow binary caches for user
|
||||
add_config "trusted-users = root ${USER:-}"
|
||||
# Add github access token
|
||||
|
@ -78,14 +81,6 @@ done
|
|||
|
||||
sh "$workdir/install" "${installer_options[@]}"
|
||||
|
||||
if [[ $OSTYPE =~ darwin ]]; then
|
||||
# macOS needs certificates hints
|
||||
cert_file=/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt
|
||||
echo "NIX_SSL_CERT_FILE=$cert_file" >> "$GITHUB_ENV"
|
||||
export NIX_SSL_CERT_FILE=$cert_file
|
||||
sudo launchctl setenv NIX_SSL_CERT_FILE "$cert_file"
|
||||
fi
|
||||
|
||||
# Set paths
|
||||
echo "/nix/var/nix/profiles/default/bin" >> "$GITHUB_PATH"
|
||||
# new path for nix 2.14
|
||||
|
|
Loading…
Reference in a new issue