From 8ab3881720f30f58e8ce528b4b75fbb65cc91b5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Fri, 16 Jun 2023 19:51:34 +0100 Subject: [PATCH 1/2] use system certs --- install-nix.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/install-nix.sh b/install-nix.sh index ee19c35..b8875d9 100755 --- a/install-nix.sh +++ b/install-nix.sh @@ -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 From e27879448eb0b7e6f98583166f1092227e7d6356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Fri, 16 Jun 2023 19:51:56 +0100 Subject: [PATCH 2/2] Nix: 2.15.1 -> 2.16.1 --- install-nix.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install-nix.sh b/install-nix.sh index b8875d9..e0490b5 100755 --- a/install-nix.sh +++ b/install-nix.sh @@ -69,7 +69,7 @@ echo "installer options: ${installer_options[*]}" # There is --retry-on-errors, but only newer curl versions support that curl_retries=5 -while ! curl -sS -o "$workdir/install" -v --fail -L "${INPUT_INSTALL_URL:-https://releases.nixos.org/nix/nix-2.15.1/install}" +while ! curl -sS -o "$workdir/install" -v --fail -L "${INPUT_INSTALL_URL:-https://releases.nixos.org/nix/nix-2.16.1/install}" do sleep 1 ((curl_retries--))