forked from hswaw/hscloud
tools/nixops.sh: add
This commit is contained in:
parent
e986728648
commit
a4b3767455
1 changed files with 18 additions and 0 deletions
18
tools/nixops.sh
Executable file
18
tools/nixops.sh
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# A wrapper around real nixops to decrypt GCP secret.
|
||||
|
||||
if [ -z "$hscloud_root" ]; then
|
||||
echo 2>&1 "Please source env.sh"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for f in sa.json; do
|
||||
plain="$hscloud_root/gcp/secrets/plain/sa.json"
|
||||
cipher="$hscloud_root/gcp/secrets/cipher/sa.json"
|
||||
if [ ! -f "$plain" ]; then
|
||||
secretstore decrypt "$cipher" > "$plain"
|
||||
fi
|
||||
done
|
||||
|
||||
nixops.bin "$@"
|
Loading…
Reference in a new issue