diff options
-rw-r--r-- | default.nix | 6 | ||||
-rwxr-xr-x | nixops/scripts/nixops_wrap | 10 |
2 files changed, 11 insertions, 5 deletions
diff --git a/default.nix b/default.nix index 579dfae..51ebcc2 100644 --- a/default.nix +++ b/default.nix | |||
@@ -616,6 +616,11 @@ let | |||
616 | ''; | 616 | ''; |
617 | }); | 617 | }); |
618 | 618 | ||
619 | mypkgs.nixops = nixops.overrideAttrs (old: { | ||
620 | preConfigure = (old.preConfigure or "") + '' | ||
621 | sed -i -e "/'keyFile'/s/'path'/'string'/" nixops/backends/__init__.py | ||
622 | ''; | ||
623 | }); | ||
619 | mypkgs.flrn = let | 624 | mypkgs.flrn = let |
620 | slang = stdenv.mkDerivation rec { | 625 | slang = stdenv.mkDerivation rec { |
621 | name = "slang-debian-patched-${version}"; | 626 | name = "slang-debian-patched-${version}"; |
@@ -691,7 +696,6 @@ in | |||
691 | inherit keybase; | 696 | inherit keybase; |
692 | inherit bogofilter; | 697 | inherit bogofilter; |
693 | inherit mtr; | 698 | inherit mtr; |
694 | inherit nixops; | ||
695 | inherit urlview; | 699 | inherit urlview; |
696 | inherit rr; | 700 | inherit rr; |
697 | inherit nix-zsh-completions; | 701 | inherit nix-zsh-completions; |
diff --git a/nixops/scripts/nixops_wrap b/nixops/scripts/nixops_wrap index 3a894f9..e4f5dc5 100755 --- a/nixops/scripts/nixops_wrap +++ b/nixops/scripts/nixops_wrap | |||
@@ -9,14 +9,16 @@ fi | |||
9 | TEMP=$(mktemp -d /tmp/XXXXXX-nixops-files) | 9 | TEMP=$(mktemp -d /tmp/XXXXXX-nixops-files) |
10 | chmod go-rwx $TEMP | 10 | chmod go-rwx $TEMP |
11 | 11 | ||
12 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
13 | nixops="$(nix-build --no-out-link -A nixops "$(dirname $(dirname $DIR))")/bin/nixops" | ||
14 | |||
12 | finish() { | 15 | finish() { |
13 | rm -rf "$TEMP" | 16 | rm -rf "$TEMP" |
14 | nixops set-args --unset privateFiles | 17 | $nixops set-args --unset privateFiles |
15 | } | 18 | } |
16 | 19 | ||
17 | trap finish EXIT | 20 | trap finish EXIT |
18 | 21 | ||
19 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
20 | export NIXOPS_STATE="$(dirname $DIR)/state/eldiron.nixops" | 22 | export NIXOPS_STATE="$(dirname $DIR)/state/eldiron.nixops" |
21 | export NIXOPS_DEPLOYMENT="$DeploymentUuid" | 23 | export NIXOPS_DEPLOYMENT="$DeploymentUuid" |
22 | 24 | ||
@@ -26,9 +28,9 @@ files=$(pass ls $NIXOPS_CONFIG_PASS_SUBTREE_PATH/Nixops/files | sed -e '1d' -e ' | |||
26 | for file in $files; do | 28 | for file in $files; do |
27 | pass show "$NIXOPS_CONFIG_PASS_SUBTREE_PATH/Nixops/files/$file" > $TEMP/$file | 29 | pass show "$NIXOPS_CONFIG_PASS_SUBTREE_PATH/Nixops/files/$file" > $TEMP/$file |
28 | done | 30 | done |
29 | nixops set-args --argstr privateFiles "$TEMP" | 31 | $nixops set-args --argstr privateFiles "$TEMP" |
30 | 32 | ||
31 | source $(dirname $(dirname $DIR))/nix_path_env | 33 | source $(dirname $(dirname $DIR))/nix_path_env |
32 | # __noChroot: ssh-config-file requires relaxed | 34 | # __noChroot: ssh-config-file requires relaxed |
33 | export NIX_PATH="ssh-config-file=$(dirname $DIR)/ssh/config:$NIX_PATH" | 35 | export NIX_PATH="ssh-config-file=$(dirname $DIR)/ssh/config:$NIX_PATH" |
34 | nixops "$@" | 36 | $nixops "$@" |