feat: adds secrets

Signed-off-by: Menno van Leeuwen <menno@vleeuwen.me>
This commit is contained in:
2024-08-22 23:36:09 +02:00
parent db2beac40c
commit c9332006e4
9 changed files with 118 additions and 3 deletions

18
bin/actions/git/pre-commit Executable file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env zsh
source ~/dotfiles/bin/helpers/functions.sh
# Check for unencrypted files in .ssh/config.d/
unencrypted_files=$(find config/ssh/config.d/ -type f ! -name "*.gpg")
if [ -n "$unencrypted_files" ]; then
printfe "%s\n" "red" "Unencrypted files found in .ssh/config.d/:"
for file in $(find config/ssh/config.d/ -type f ! -name "*.gpg"); do
printfe "%s\n" "yellow" " - $file"
done
echo ""
printfe "%s\n" "blue" "Use 'dotf secrets encrypt' to encrypt them."
exit 1
fi