]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - nixops/scripts/with_env
Simplify management of secrets in nixops
[perso/Immae/Config/Nix.git] / nixops / scripts / with_env
index dd0fecba878f2965e4139ee27dab33c98311f778..26e74b5f6d77b2f1851c9159f249344ad7f17b6c 100755 (executable)
@@ -5,11 +5,6 @@ if [ -z "$NIXOPS" ]; then
   exit 1;
 fi
 
-if [ -z "$NIXOPS_CONFIG_PASS_SUBTREE_PATH" ]; then
-  echo "Please set NIXOPS_CONFIG_PASS_SUBTREE_PATH to the password-store subtree path"
-  exit 1;
-fi
-
 TEMP=$(mktemp -d /tmp/XXXXXX-nixops-files)
 chmod go-rwx $TEMP
 
@@ -21,10 +16,10 @@ finish() {
 trap finish EXIT
 
 # pass cannot "just" list files in a directory without showing a tree :(
-files=$(pass ls $NIXOPS_CONFIG_PASS_SUBTREE_PATH/Nixops/files | sed -e '1d' -e 's/^.* //')
+files=$(pass ls Nixops/files | sed -e '1d' -e 's/^.* //')
 
 for file in $files; do
-  pass show "$NIXOPS_CONFIG_PASS_SUBTREE_PATH/Nixops/files/$file" > $TEMP/$file
+  pass show "Nixops/files/$file" > $TEMP/$file
 done
 $NIXOPS set-args --argstr privateFiles "$TEMP"