aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--default.nix6
-rwxr-xr-xnixops/scripts/nixops_wrap10
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
9TEMP=$(mktemp -d /tmp/XXXXXX-nixops-files) 9TEMP=$(mktemp -d /tmp/XXXXXX-nixops-files)
10chmod go-rwx $TEMP 10chmod go-rwx $TEMP
11 11
12DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
13nixops="$(nix-build --no-out-link -A nixops "$(dirname $(dirname $DIR))")/bin/nixops"
14
12finish() { 15finish() {
13 rm -rf "$TEMP" 16 rm -rf "$TEMP"
14 nixops set-args --unset privateFiles 17 $nixops set-args --unset privateFiles
15} 18}
16 19
17trap finish EXIT 20trap finish EXIT
18 21
19DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
20export NIXOPS_STATE="$(dirname $DIR)/state/eldiron.nixops" 22export NIXOPS_STATE="$(dirname $DIR)/state/eldiron.nixops"
21export NIXOPS_DEPLOYMENT="$DeploymentUuid" 23export NIXOPS_DEPLOYMENT="$DeploymentUuid"
22 24
@@ -26,9 +28,9 @@ files=$(pass ls $NIXOPS_CONFIG_PASS_SUBTREE_PATH/Nixops/files | sed -e '1d' -e '
26for file in $files; do 28for 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
28done 30done
29nixops set-args --argstr privateFiles "$TEMP" 31$nixops set-args --argstr privateFiles "$TEMP"
30 32
31source $(dirname $(dirname $DIR))/nix_path_env 33source $(dirname $(dirname $DIR))/nix_path_env
32# __noChroot: ssh-config-file requires relaxed 34# __noChroot: ssh-config-file requires relaxed
33export NIX_PATH="ssh-config-file=$(dirname $DIR)/ssh/config:$NIX_PATH" 35export NIX_PATH="ssh-config-file=$(dirname $DIR)/ssh/config:$NIX_PATH"
34nixops "$@" 36$nixops "$@"