make directory to put asset files in + move age key there

This commit is contained in:
inkch 2024-01-18 12:14:18 +09:00
parent a941ff9437
commit 36fd4c6426
2 changed files with 7 additions and 0 deletions

View File

@ -0,0 +1,7 @@
#!/bin/sh
if [ ! -f "${HOME}/.config/chezmoi/key.txt" ]; then
mkdir -p "${HOME}/.config/chezmoi"
chezmoi age decrypt --output "${HOME}/.config/chezmoi/key.txt" --passphrase "{{ .chezmoi.sourceDir }}/.assets/key.txt.age"
chmod 600 "${HOME}/.config/chezmoi/key.txt"
fi