aboutsummaryrefslogtreecommitdiff
path: root/nixops/scripts/with_env
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2020-09-04 02:40:24 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2020-09-04 02:59:46 +0200
commit34abd6afa44c620a56416bd423a2438a09bd1ce4 (patch)
treeb7eef613348fcb9d8fabd19c0437430c30678152 /nixops/scripts/with_env
parentf5cbc6f767ee234e9cdd53baa113d5ab26edb6d8 (diff)
downloadNix-34abd6afa44c620a56416bd423a2438a09bd1ce4.tar.gz
Nix-34abd6afa44c620a56416bd423a2438a09bd1ce4.tar.zst
Nix-34abd6afa44c620a56416bd423a2438a09bd1ce4.zip
Migrate to morph as a replacement to nixops
The deployment tasks are now independent of any state
Diffstat (limited to 'nixops/scripts/with_env')
-rwxr-xr-xnixops/scripts/with_env6
1 files changed, 4 insertions, 2 deletions
diff --git a/nixops/scripts/with_env b/nixops/scripts/with_env
index 9882f78..f8e5537 100755
--- a/nixops/scripts/with_env
+++ b/nixops/scripts/with_env
@@ -5,12 +5,12 @@ if [ -z "$NIXOPS_ENV_LOADED" ]; then
5 exit 1; 5 exit 1;
6fi 6fi
7 7
8umask 0077
8TEMP=$(mktemp -d /tmp/XXXXXX-nixops-files) 9TEMP=$(mktemp -d /tmp/XXXXXX-nixops-files)
9chmod go-rwx $TEMP 10chmod go-rwx $TEMP
10 11
11finish() { 12finish() {
12 rm -rf "$TEMP" 13 rm -rf "$TEMP"
13 nixops set-args --unset privateFiles
14} 14}
15 15
16trap finish EXIT 16trap finish EXIT
@@ -21,6 +21,8 @@ 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
24nixops set-args --argstr privateFiles "$TEMP" 24
25export NIX_PATH="privateFiles=$TEMP:$NIX_PATH"
26export SSH_IDENTITY_FILE="$TEMP/id_ed25519"
25 27
26"$@" 28"$@"