Update .chezmoi.toml

Add .install-bw.sh
Update .ssh/id_ed25519.pub
Update .ssh/id_ed25519
This commit is contained in:
punkfairie 2024-09-28 09:52:56 -07:00
parent c893d8abcb
commit 4cdb15a1b6
Signed by: punkfairie
GPG key ID: A86AF57F837E320F
4 changed files with 33 additions and 5 deletions

View file

@ -9,9 +9,6 @@
progress = true
encryption = "gpg"
[git]
autoPush = true
[diff]
{{ if lookPath "delta" -}}
command = "delta"
@ -24,6 +21,12 @@ exclude = ["scripts"]
symmetric = true
args = ["--batch", "--passphrase", {{ $passphrase | quote }}, "--no-symkey-cache"]
[git]
autoPush = true
[hooks.read-source-state.pre]
command = ".local/share/chezmoi/.install-bw.sh"
[data]
{{ if lookPath "get-gpg-key" -}}
gpgKey = {{ output "get-gpg-key" | trim | quote }}

21
.install-bw.sh Normal file
View file

@ -0,0 +1,21 @@
#!/usr/bin/env sh
type bw >/dev/null 2>&1 && exit
case "$(uname -s)" in
Darwin)
brew install bitwarden-cli
;;
Linux)
if command -v yay 2>&1; then
yay -S bitwarden-cli
elif command -v pacman 2>&1; then
pacman -S bitwarden-cli
elif command -v npm 2>&1; then
npm install -g @bitwarden/cli
else
echo "unsupported OS"
exit 1
fi
;;
esac

View file

@ -1 +1,3 @@
{{- bitwardenAttachment "id_ed25519.pub" "a551a692-b06a-49c0-9aa6-b16001875eed" -}}
{{- if not (stat (joinPath .chezmoi.homeDir ".ssh/id_ed25519.pub")) -}}
{{- bitwardenAttachment "id_ed25519.pub" "a551a692-b06a-49c0-9aa6-b16001875eed" -}}
{{- end -}}

View file

@ -1 +1,3 @@
{{- bitwardenAttachment "id_ed25519" "a551a692-b06a-49c0-9aa6-b16001875eed" -}}
{{- if not (stat (joinPath .chezmoi.homeDir ".ssh/id_ed25519")) -}}
{{- bitwardenAttachment "id_ed25519" "a551a692-b06a-49c0-9aa6-b16001875eed" -}}
{{- end -}}