Skip to content

Commit cd37898

Browse files
committed
chore(readme): testing script embed
1 parent 2a1ee28 commit cd37898

1 file changed

Lines changed: 14 additions & 13 deletions

File tree

README.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
# Dotfiles
2-
My dotfiles, managed with [`chezmoi`](https://github.com/twpayne/chezmoi).
2+
My dotfiles, managed with:
3+
- [`Chezmoi`](https://www.chezmoi.io/).
4+
- [`Bitwarden Secrets`](https://bitwarden.com/products/secrets-manager/).
5+
- [`Age`](https://github.com/FiloSottile/age).
36

47
Install via Chezmoi:
58
```sh
69
sh -c "$(curl -fsLS get.chezmoi.io)" -- -b $HOME/.local/bin init --apply $GITHUB_USERNAME
710
```
811

9-
The following script automatically runs to decrypt a passphrase via [Age](https://www.chezmoi.io/reference/commands/age/):
10-
```sh
11-
#!/bin/sh
12-
DIR="${HOME}/.config/chezmoi"
13-
14-
if [ ! -f "${DIR}/chezmoi.key" ]; then
15-
mkdir -p "${DIR}"
16-
chezmoi age decrypt --output "${DIR}/chezmoi.key" --passphrase "{{ .chezmoi.sourceDir }}/chezmoi.key.age"
17-
chmod 600 "${DIR}/chezmoi.key"
18-
chezmoi decrypt "{{ .chezmoi.sourceDir }}/encrypted_dot_zshenv.age" >> "${HOME}/.zshenv"
19-
fi
20-
```
12+
The following script automatically runs to decrypt a passphrase via [age](https://www.chezmoi.io/reference/commands/age/):
13+
<details>
14+
<summary>View Script</summary>
15+
https://github.com/fredrdz/dotfiles/blob/2a1ee28c59af717fb72be880b33189cee465e395/.chezmoiscripts/run_once_before_decrypt-private-key.sh.tmpl
16+
</details>
2117

2218
Then a pre-install script runs to install and use [Bitwarden Secrets](https://www.chezmoi.io/reference/templates/bitwarden-functions/bitwardenSecrets/).
19+
20+
<details>
21+
<summary>View Script</summary>
22+
https://github.com/fredrdz/dotfiles/blob/main/.chezmoiscripts/run_once_before_install-password-manager.sh
23+
</details>

0 commit comments

Comments
 (0)