a941ff9437
.chezmoiscripts --------------- If a directory called .chezmoiscripts exists in the root of the source directory then any scripts in it are executed as normal scripts without creating a corresponding directory in the target state. --- https://www.chezmoi.io/reference/special-files-and-directories/chezmoiscripts/
8 lines
272 B
Bash
8 lines
272 B
Bash
#!/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 }}/key.txt.age"
|
|
chmod 600 "${HOME}/.config/chezmoi/key.txt"
|
|
fi
|