From d5d97b8b57457989ff3a0fa38229a98482d33f65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Fri, 24 May 2019 23:56:22 +0200 Subject: Fix setup script using nixpos_custom --- nixops/scripts/setup | 2 +- scripts/nix_env | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nixops/scripts/setup b/nixops/scripts/setup index cc03482..dce8332 100755 --- a/nixops/scripts/setup +++ b/nixops/scripts/setup @@ -94,9 +94,9 @@ if nix show-config --json | jq -e '.sandbox.value == "true"' >/dev/null; then fi DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -source $(dirname $(dirname $DIR))/scripts/nix_env export NIXOPS_STATE="$(dirname $DIR)/state/eldiron.nixops" export NIXOPS_DEPLOYMENT="$DeploymentUuid" +source $(dirname $(dirname $DIR))/scripts/nix_env if ! nixops_custom info 2>/dev/null >/dev/null; then cat <<-EOF diff --git a/scripts/nix_env b/scripts/nix_env index 6326243..fc6557c 100644 --- a/scripts/nix_env +++ b/scripts/nix_env @@ -11,7 +11,7 @@ nixpkgsNext="$nixpkgs" export NIX_PATH="nixpkgs=$nixpkgs:nixpkgsNext=$nixpkgsNext:nixpkgsPrevious=$nixpkgsPrevious" nixops_custom () { - DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" - d=$(nix-build --no-out-link -E "with import { overlays = builtins.attrValues (import $(dirname $DIR)/overlays); }; nixops") + _DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" + d=$(nix-build --no-out-link -E "with import { overlays = builtins.attrValues (import $(dirname $_DIR)/overlays); }; nixops") ${d}/bin/nixops "$@" } -- cgit v1.2.3