aboutsummaryrefslogtreecommitdiff
path: root/nixops/scripts/with_env
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2021-10-07 15:17:30 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2021-10-13 00:00:55 +0200
commit282c67a117b7d349b30a96972b050d630f906dec (patch)
tree6686bdc126d5c0bd548cd6286a41be5c8cfdc01f /nixops/scripts/with_env
parent97f5a24bc8839328571b23eb5f910de206ddbe1f (diff)
downloadNix-282c67a117b7d349b30a96972b050d630f906dec.tar.gz
Nix-282c67a117b7d349b30a96972b050d630f906dec.tar.zst
Nix-282c67a117b7d349b30a96972b050d630f906dec.zip
Refactor secrets handling
Diffstat (limited to 'nixops/scripts/with_env')
-rwxr-xr-xnixops/scripts/with_env8
1 files changed, 1 insertions, 7 deletions
diff --git a/nixops/scripts/with_env b/nixops/scripts/with_env
index f8e5537..c570ccf 100755
--- a/nixops/scripts/with_env
+++ b/nixops/scripts/with_env
@@ -15,14 +15,8 @@ finish() {
15 15
16trap finish EXIT 16trap finish EXIT
17 17
18# pass cannot "just" list files in a directory without showing a tree :( 18sops -d secrets/vars.yml | yq -r .ssl_keys.nix_repository > $TEMP/id_ed25519
19files=$(pass ls Nixops/files | sed -e '1d' -e 's/^.* //')
20 19
21for file in $files; do
22 pass show "Nixops/files/$file" > $TEMP/$file
23done
24
25export NIX_PATH="privateFiles=$TEMP:$NIX_PATH"
26export SSH_IDENTITY_FILE="$TEMP/id_ed25519" 20export SSH_IDENTITY_FILE="$TEMP/id_ed25519"
27 21
28"$@" 22"$@"