Skip to content

bllooi/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotfiles

Personal config, version-controlled so a new machine reproduces the setup I like (zsh + oh-my-zsh + Pure prompt, WezTerm, Zed, btop, git).

Layout

dotfiles/
├── home/            mirrors $HOME — every file here is symlinked into ~
│   ├── .zshrc
│   ├── .gitconfig
│   └── .config/
│       ├── wezterm/wezterm.lua
│       ├── zed/settings.json
│       ├── git/ignore            (global gitignore)
│       └── btop/btop.conf
├── system/          mirrors absolute paths — root-owned, NOT symlinked
│   └── etc/
│       ├── dnf/dnf.conf              (fastestmirror=1)
│       └── sysctl.d/99-sysrq.conf    (kernel.sysrq=1, safe recovery)
├── hardware/        per-model fixes — applied only on matching DMI
│   └── lenovo-thinkpad-t14s-gen4-amd/
│       ├── README.md                 (why each workaround exists)
│       └── etc/modprobe.d/blacklist-nfc.conf
├── install.sh       symlinks home/* into $HOME (dependency-free)
├── bootstrap.sh     installs deps + applies system/* + hardware/* with sudo
└── .gitignore

The repo only tracks hand-written config. Installed software the config depends on (oh-my-zsh, Pure, fzf, the Nerd Font, nvm) is not in here — bootstrap.sh installs that.

home/ files are symlinked into ~ (edit-in-place, instantly live). system/ files are root-owned and outside $HOME, so bootstrap.sh copies them with sudo (existing file backed up as <file>~). A symlink would be wrong there — editing ~/dotfiles must never need root, and a dangling link into the repo from /etc is fragile. The trade-off: a system/ change isn't live until you re-run bootstrap.sh, unlike the instant home/ symlinks.

hardware/<model>/ holds model-specific fixes (driver blacklists, kernel args, firmware-quirk workarounds). bootstrap.sh applies a model's tree only when the running machine's DMI product_family matches — on any other hardware the whole block self-skips, so the repo stays safe to use across different machines. Each model directory has its own README.md explaining why each workaround exists.

New machine

git clone git@github.com:bllooi/dotfiles.git ~/dotfiles
cd ~/dotfiles
./bootstrap.sh      # zsh, fzf, oh-my-zsh, Pure, Nerd Font, nvm, default shell
./install.sh        # symlink the configs into ~
exec zsh            # or just open a new terminal

install.sh moves any pre-existing real file aside to <file>.dotfiles-bak.<timestamp> before linking — nothing is destroyed.

Daily use

The symlinked files in ~ are the repo files. Edit in place, then:

cd ~/dotfiles && git add -A && git commit -m "..." && git push

On other machines: git pull (no re-install needed — symlinks already point at the repo).

Git identity

home/.gitconfig is set to Brendan Looi <shenweilooi@gmail.com>. Change in that file and commit if it ever needs updating.

Adding a new dotfile

mkdir -p ~/dotfiles/home/.config/foo
cp ~/.config/foo/config ~/dotfiles/home/.config/foo/config
~/dotfiles/install.sh        # links the new one, leaves the rest

Never put secrets in home/ — private keys, tokens, .ssh/ are blocked by .gitignore as a backstop, but don't rely on it.

About

The way I like my computer to be setup.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors