Update shell script shebangs

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-01-28 10:23:24 +00:00
parent 614ae96247
commit c3874a6de6
3 changed files with 6 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env -S nix shell nixpkgs#ssh-to-age -c bash
set -o errexit
set -o nounset
@@ -15,7 +15,7 @@ mkdir -p "./hosts/$host/secrets"
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")
age_key=$(cat './hosts/$host/secrets/ssh_host_ed25519_key.pub' | ssh-to-age)
find . -type f -name "sops.yaml" | while IFS= read -r sops_file; do
sed -i "/- hosts:/a\ - &$host $age_key" "$sops_file"