about summary refs log tree commit diff
path: root/scripts/install-nix-from-closure.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/install-nix-from-closure.sh')
-rw-r--r--scripts/install-nix-from-closure.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/install-nix-from-closure.sh b/scripts/install-nix-from-closure.sh
index 0a2890eeed95..8aa227afaacb 100644
--- a/scripts/install-nix-from-closure.sh
+++ b/scripts/install-nix-from-closure.sh
@@ -73,7 +73,11 @@ fi
 
 # Subscribe the user to the Nixpkgs channel and fetch it.
 if ! $nix/bin/nix-channel --list | grep -q "^nixpkgs "; then
-    $nix/bin/nix-channel --add http://nixos.org/channels/nixpkgs-unstable
+    if [ -n "$SSL_CERT_FILE" ]; then
+        $nix/bin/nix-channel --add https://nixos.org/channels/nixpkgs-unstable
+    else
+        $nix/bin/nix-channel --add http://nixos.org/channels/nixpkgs-unstable
+    fi
 fi
 $nix/bin/nix-channel --update nixpkgs