From 34c5871481ec3d8e8ceaf0b63a006bb5b2d8e8c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Fri, 1 Feb 2019 13:25:57 +0100 Subject: Freeze channel version when deploying. --- nixops/scripts/setup | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) (limited to 'nixops/scripts/setup') diff --git a/nixops/scripts/setup b/nixops/scripts/setup index ff20fc9..d9d4258 100755 --- a/nixops/scripts/setup +++ b/nixops/scripts/setup @@ -1,6 +1,8 @@ #!/bin/bash RemoteRepo="gitolite@git.immae.eu:perso/Immae/Prive/Password_store/Mes_Sites/Paul" +NixChannelUrl='https://releases.nixos.org/nixos/18.09/nixos-18.09.1834.9d608a6f592' +NixChannelName='immaeNixpkgs' if [ -z "$NIXOPS_CONFIG_PASS_SUBTREE_REMOTE" \ -o -z "$NIXOPS_CONFIG_PASS_SUBTREE_PATH" ]; then @@ -67,16 +69,27 @@ EOF fi fi -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -nix_config="ssh-config-file=$(dirname $DIR)/ssh/config" -if echo "$NIX_PATH" | grep -q "$nix_config"; then - cat < nix-channel --add $NixChannelUrl $NixChannelName +> nix-channel --update +If this step fail, you may have to disable sandboxing in +/etc/nix/nix.conf and rerun +> nix-channel --update +manually. +Continue? [y/N] EOF + read y + if [ "$y" = "y" -o "$y" = "Y" ]; then + nix-channel --add $NixChannelUrl $NixChannelName + nix-channel --update + fi fi + +cat <