You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dot-files/run_once_before_decrypt-pri...

10 lines
341 B
Cheetah

#!/usr/bin/env bash
if [ ! -f "{{ .chezmoi.homeDir }}/.config/chezmoi/key.txt" ]; then
mkdir -p "{{ .chezmoi.homeDir }}/.config/chezmoi"
chezmoi age decrypt \
--output "{{ .chezmoi.homeDir }}/.config/chezmoi/key.txt" \
--passphrase "{{ .chezmoi.sourceDir }}/key.txt.age"
chmod 600 "{{ .chezmoi.homeDir }}/.config/chezmoi/key.txt"
fi