]>
git.immae.eu Git - perso/Immae/Config/Nix.git/blob - nixops/scripts/with_env
3 if [ -z "$NIXOPS" ]; then
4 echo "Please set NIXOPS to the nixops command"
8 if [ -z "$NIXOPS_CONFIG_PASS_SUBTREE_PATH" ]; then
9 echo "Please set NIXOPS_CONFIG_PASS_SUBTREE_PATH to the password-store subtree path"
13 TEMP
=$(mktemp -d /tmp/XXXXXX-nixops-files)
18 $NIXOPS set-args --unset privateFiles
23 # pass cannot "just" list files in a directory without showing a tree :(
24 files
=$(pass ls $NIXOPS_CONFIG_PASS_SUBTREE_PATH/Nixops/files | sed -e '1d' -e 's/^.* //')
26 for file in $files; do
27 pass show
"$NIXOPS_CONFIG_PASS_SUBTREE_PATH/Nixops/files/$file" > $TEMP/$file
29 $NIXOPS set-args --argstr privateFiles
"$TEMP"