From 4a198dae746379effe04c19341f1d370461c71c7 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 7 Aug 2014 15:36:54 +0200 Subject: [PATCH] install-nix-from-closure.sh: Use https channel if possible --- scripts/install-nix-from-closure.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/install-nix-from-closure.sh b/scripts/install-nix-from-closure.sh index 0a2890eee..8aa227afa 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