Unfuck secrets
Don't worry why all the commit hashes suddenly changed, it's fine. Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -5,8 +5,8 @@ set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
if [[ "$#" -ne 2 ]]; then
|
||||
echo "Usage: $0 <host> <sops-master-key>"
|
||||
if [[ "$#" -ne 1 ]]; then
|
||||
echo "Usage: $0 <host>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -20,11 +20,11 @@ find . -type f -name "sops.yaml" | while IFS= read -r sops_file; do
|
||||
done
|
||||
|
||||
sed -i "/$host/d" ./hosts/common/configs/system/ssh/default.nix
|
||||
sed -i "/$host/d" ./hosts/common/configs/user/console/ssh/default.nix
|
||||
|
||||
"$(dirname "$0")/update-keys.sh" "$2"
|
||||
sed -i "/$host/d" ./README.md
|
||||
|
||||
rm -rf "./hosts/$host"
|
||||
|
||||
"$(dirname "$0")/update-keys.sh"
|
||||
|
||||
echo "Please remove SSH key pairs for any users that used to connect to $host."
|
||||
echo "Host $host has been successfully removed."
|
||||
echo "Please remove SSH key pairs for any users that used to connect to this host."
|
||||
|
Reference in New Issue
Block a user