Move scripts

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2024-12-19 12:47:36 +00:00
parent 84a7667097
commit a92c8e59df
6 changed files with 6 additions and 7 deletions

View File

@@ -1,21 +0,0 @@
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
if [[ "$#" -ne 1 ]]; then
echo "Usage: $0 <sops-master-key>"
exit 1
fi
export SOPS_AGE_KEY_FILE="$1"
for SOPS_FILE in $(find . -type f -name 'sops.yaml'); do
dir=$(dirname "${SOPS_FILE}")
echo "${dir}"
find "${dir}" -maxdepth 1 -type f -regextype posix-extended -regex '.+\.(yaml|yml|json|env|ini|bin)' | while read -r file; do
echo "${file}"
nix shell nixpkgs#sops --command sops --config "${SOPS_FILE}" updatekeys "${file}" -y
done
done