the files that makes me feel at ~/
🏠 Dotfiles

My personal dotfiles.
This is as XDG Base Directory Standard compliant as possible!
Highlights
.config/ - I’ve spent quite some effort to make my dotfiles adhere to the XDG Base Directory Standard as much as possible, using and contributing to the Arch wiki page. As far from all programs that I use support this natively, quite some custom configuration needs to be done. Grep for XDG in .config/zsh.
nvim/ - check out my Neovim configurations; they are pretty cool!
bin/ - many handy and time saving scripts.
docs/ - supplementary documentation.
Installation
Bootstrap
Bootstrap using bin/dotfiles_bootstrap.sh:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/erikw/dotfiles/main/bin/dotfiles_bootstrap.sh)"
This will interactively set up a GitHub SSH key, clone this repo, and run ./install.sh.
To reinstall the default global packages for mise-managed runtimes later, run mise run bootstrap or a single runtime task such as mise run bootstrap:python. The package lists live under .config/mise/packages/.
Local branch
If using this: uncomment the cronjob in user’s crontab for ~/bin/dotfiles_backup_local.sh.
If really really needed, switch to a local branch for secret changes:
cd ~/src/github.com/erikw/dotfiles
git checkout -b local
and after making some changes to the branch, squash to one commit:
git commit -m "SQUASHED passwords"
Host-specific configuration
- Passwords and other secrets are censored. To find these and substitute them for the real thing, do:
grep -nr GIT-CENSORED . | grep -v README.md | grep -v "/.git/"
- Set
DESKTYPE in $XDG_CONFIG_HOME/zsh/env/programs, unless the system is macOS.
- Default desktop is assumed to be macOS. Some config files does not allow for OS-dependent config, or is inpractical to do. Thus, go through host-specific manual settings by searching for the corresponding tag.
grep -nr '#CONFIG-MACOS' . 2>/dev/null | grep -v README.md
grep -nr '#CONFIG-LINUX' . 2>/dev/null | grep -v README.md
grep -nr '#CONFIG-FREEBSD' . 2>/dev/null | grep -v README.md
GitHub SSH Config File
To ensure success, use a manual entry like this (modify output from bin/ssh-keygen.sh:
~/.ssh/config
Host github.com
User git
Port 22
PreferredAuthentications publickey
IdentityFile ~/.ssh/identityfiles/REDACT
评论