aboutsummaryrefslogtreecommitdiff
path: root/nixops/scripts
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2020-08-29 18:37:54 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2020-08-29 18:37:54 +0200
commitda28a4e2afef21710f73860b26893fa18dd32858 (patch)
tree3ce951ff67ab7eb8d55fa79415bacaca85896256 /nixops/scripts
parent1052bfda27ad0607cd4dc5dc91e2d8e8220c30c7 (diff)
downloadNix-da28a4e2afef21710f73860b26893fa18dd32858.tar.gz
Nix-da28a4e2afef21710f73860b26893fa18dd32858.tar.zst
Nix-da28a4e2afef21710f73860b26893fa18dd32858.zip
Add environment file instead of hardcoding everything in makefiles
Diffstat (limited to 'nixops/scripts')
-rwxr-xr-xnixops/scripts/with_env8
1 files changed, 4 insertions, 4 deletions
diff --git a/nixops/scripts/with_env b/nixops/scripts/with_env
index 26e74b5..9882f78 100755
--- a/nixops/scripts/with_env
+++ b/nixops/scripts/with_env
@@ -1,7 +1,7 @@
1#!/usr/bin/env bash 1#!/usr/bin/env bash
2 2
3if [ -z "$NIXOPS" ]; then 3if [ -z "$NIXOPS_ENV_LOADED" ]; then
4 echo "Please set NIXOPS to the nixops command" 4 echo "Please load the environment with direnv"
5 exit 1; 5 exit 1;
6fi 6fi
7 7
@@ -10,7 +10,7 @@ chmod go-rwx $TEMP
10 10
11finish() { 11finish() {
12 rm -rf "$TEMP" 12 rm -rf "$TEMP"
13 $NIXOPS set-args --unset privateFiles 13 nixops set-args --unset privateFiles
14} 14}
15 15
16trap finish EXIT 16trap finish EXIT
@@ -21,6 +21,6 @@ files=$(pass ls Nixops/files | sed -e '1d' -e 's/^.* //')
21for file in $files; do 21for file in $files; do
22 pass show "Nixops/files/$file" > $TEMP/$file 22 pass show "Nixops/files/$file" > $TEMP/$file
23done 23done
24$NIXOPS set-args --argstr privateFiles "$TEMP" 24nixops set-args --argstr privateFiles "$TEMP"
25 25
26"$@" 26"$@"