dot-files/run_once_before_ensure-age-key.sh.tmpl
Buddy f6ed0f750e Allow multiple recipients for age encryption
- Add input for role for work and personal
 - Remove unused values in chezmoi data
 - Expect age.key instead of having the public key in the path
2025-02-14 12:48:36 -08:00

8 lines
290 B
Bash

#!/usr/bin/env bash
if [ ! -f "{{ .chezmoi.homeDir }}/.config/chezmoi/age.key" ]; then
mkdir -p "{{ .chezmoi.homeDir }}/.config/chezmoi"
age-keygen --output "{{ .chezmoi.homeDir }}/.config/chezmoi/age.key"
chmod 400 "{{ .chezmoi.homeDir }}/.config/chezmoi/age.key"
fi