Fix utility script bugs
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -17,7 +17,7 @@ ssh-keygen -t ed25519 -f "./hosts/${HOST}/secrets/ssh_host_ed25519_key" -N ""
|
||||
|
||||
AGE_KEY=$(nix shell nixpkgs#ssh-to-age --command bash -c "cat './hosts/${HOST}/secrets/ssh_host_ed25519_key.pub' | ssh-to-age")
|
||||
|
||||
for SOPS_FILE in $(find . -type f -name "sops.yaml"); do
|
||||
find . -type f -name "sops.yaml" | while IFS= read -r SOPS_FILE; do
|
||||
sed -i "/- hosts:/a\ - &${HOST} ${AGE_KEY}" "${SOPS_FILE}"
|
||||
sed -i "/- age:/a\ - *${HOST}" "${SOPS_FILE}"
|
||||
done
|
||||
|
Reference in New Issue
Block a user