Managed by chezmoi with age encryption and Bitwarden integration.
main- Documentation onlyarnach- Configuration for arnach machine<hostname>- Create branches for additional machines
# 1. Install prerequisites
yay -S chezmoi bitwarden-cli # Arch
sudo dnf install chezmoi bitwarden-cli # Fedora
# 2. Login to Bitwarden
bw login
# 3. Initialize and apply
chezmoi init --apply --branch $(hostnamectl hostname) [email protected]:czechbol/dotfiles.gitThe install script automatically retrieves your age encryption key from Bitwarden, decrypts files, installs packages, and sets up your environment.
If branch doesn't exist:
cd ~/.local/share/chezmoi
git checkout -b $(hostnamectl hostname)
git push -u origin $(hostnamectl hostname)# Regular file
chezmoi add ~/.config/app/config.toml
# Encrypted file (passwords, API keys, etc)
chezmoi add --encrypt ~/.config/app/secrets.json
# Executable
chezmoi add --template ~/.local/bin/script
# Directory
chezmoi add ~/.config/hypr# Edit managed file
chezmoi edit ~/.config/app/config.toml
# Or edit source directly
chezmoi cd
# ... edit files ...
exitchezmoi cd
git add -A
git commit -m "Update config"
git push
exit# Pull and apply from repo
chezmoi update
# Preview changes
chezmoi diff
# Check what's managed
chezmoi managedFiles encrypted with age:
pika-backup/*.json- backup configsclipse/clipboard_history.json- clipboard history
Edit encrypted files with chezmoi edit - they're automatically decrypted/re-encrypted.
| Source | Target | Description |
|---|---|---|
dot_config |
.config |
Dot prefix |
executable_script |
script (mode 755) |
Executable |
encrypted_file.age |
file |
Encrypted |
private_file |
file (mode 600) |
Private |
Examples:
dot_zshrc→~/.zshrcdot_local/bin/executable_script→~/.local/bin/scriptencrypted_private_backup.json.age→backup.json(encrypted, mode 600)
# Sync changes
cd ~/.local/share/chezmoi
git pull
chezmoi apply
# Cherry-pick from another machine
git cherry-pick <commit-hash>
# Copy specific file from another branch
git checkout other-hostname -- home/dot_config/app/config.tomlchezmoi diff # Preview changes
chezmoi status # Check status
chezmoi re-add # Re-add modified files
chezmoi cd # Jump to source directory
chezmoi doctor # Check for issuesCan't decrypt:
bw get notes "chezmoi-age-key" > ~/.config/age/key.txt
chmod 600 ~/.config/age/key.txtBitwarden locked:
bw unlock
bw syncFull docs: https://www.chezmoi.io/