ansible-playbook -l localhost[,otherhost,...] -K dotfiles-base.yamlansible-playbook -l localhost -t nvim -K dotfiles-base.yamlThis repo now has a secrets role that restores these home-directory secrets from Bitwarden Secrets Manager:
~/.ssh/id*~/.ssh/config*~/.config/keys/*exceptBWS_ACCESS_TOKEN
Recommended:
mkdir -p ~/.config/bitwarden-sm
chmod 700 ~/.config/bitwarden-sm
printf '%s\n' 'YOUR_BWS_ACCESS_TOKEN' > ~/.config/bitwarden-sm/access-token
chmod 600 ~/.config/bitwarden-sm/access-tokenBackward-compatible fallback still supported:
~/.config/keys/BWS_ACCESS_TOKEN
Recommendation: use one Bitwarden Machine Account per machine and grant each machine account access to the shared dotfiles project. That gives you per-machine revocation without changing the repo.
From the machine that already has the correct files:
script/sync_secrets_to_bwsThat script will:
- create the Bitwarden project
dotfilesif needed - upsert matching files from
~/.sshand~/.config/keys - store each file as a Bitwarden secret keyed by its home-relative path
- Clone this repo.
- Put a Bitwarden Secrets Manager access token at
~/.config/bitwarden-sm/access-token. - Run the playbook:
ansible-playbook -l localhost[,otherhost,...] -K dotfiles-base.yamlIf you update secrets in the Bitwarden UI, just run the playbook again and the local files will be refreshed.
If you update secrets locally on a machine and want Bitwarden to become the source of truth again, run:
script/sync_secrets_to_bwsRecommendation: prefer editing in the Bitwarden UI for occasional changes, and use script/sync_secrets_to_bws when you intentionally want to publish the current machine state back into Bitwarden.
eval $(ssh-agent)
ssh-add ~/.ssh/id_rsa