Update .chezmoi.toml
Add .install-bw.sh Update .ssh/id_ed25519.pub Update .ssh/id_ed25519
This commit is contained in:
parent
c893d8abcb
commit
4cdb15a1b6
4 changed files with 33 additions and 5 deletions
|
@ -9,9 +9,6 @@
|
||||||
progress = true
|
progress = true
|
||||||
encryption = "gpg"
|
encryption = "gpg"
|
||||||
|
|
||||||
[git]
|
|
||||||
autoPush = true
|
|
||||||
|
|
||||||
[diff]
|
[diff]
|
||||||
{{ if lookPath "delta" -}}
|
{{ if lookPath "delta" -}}
|
||||||
command = "delta"
|
command = "delta"
|
||||||
|
@ -24,6 +21,12 @@ exclude = ["scripts"]
|
||||||
symmetric = true
|
symmetric = true
|
||||||
args = ["--batch", "--passphrase", {{ $passphrase | quote }}, "--no-symkey-cache"]
|
args = ["--batch", "--passphrase", {{ $passphrase | quote }}, "--no-symkey-cache"]
|
||||||
|
|
||||||
|
[git]
|
||||||
|
autoPush = true
|
||||||
|
|
||||||
|
[hooks.read-source-state.pre]
|
||||||
|
command = ".local/share/chezmoi/.install-bw.sh"
|
||||||
|
|
||||||
[data]
|
[data]
|
||||||
{{ if lookPath "get-gpg-key" -}}
|
{{ if lookPath "get-gpg-key" -}}
|
||||||
gpgKey = {{ output "get-gpg-key" | trim | quote }}
|
gpgKey = {{ output "get-gpg-key" | trim | quote }}
|
||||||
|
|
21
.install-bw.sh
Normal file
21
.install-bw.sh
Normal 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
|
|
@ -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 -}}
|
||||||
|
|
|
@ -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 -}}
|
||||||
|
|
Loading…
Reference in a new issue