Skip to content

juan-lee/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotfiles

Personal dotfiles managed using the bare git repository method. Tool and runtime versions are managed with asdf.

How it works

Dotfiles are tracked in a bare git repo at $HOME/.cfg with $HOME as the working tree. A shell alias keeps regular git commands separate:

alias config='git --git-dir=$HOME/.cfg/ --work-tree=$HOME'

Use config in place of git to manage dotfiles:

config status
config add .vimrc
config commit -m "add vimrc"
config push

Untracked files are hidden by default (status.showUntrackedFiles no), so only explicitly added files are shown.

Bootstrap a new machine

The bootstrap script sets up a fresh Ubuntu 24.04 machine from scratch:

DOTFILES_REPO_URL=git@github.com:juan-lee/dotfiles.git ./script/bootstrap

This is idempotent and will:

  1. Install base packages (git, curl, zsh, etc.)
  2. Clone the bare dotfiles repo to ~/.cfg and check out files to $HOME (conflicting files are backed up to ~/.config-backup)
  3. Install Oh My Zsh without overwriting ~/.zshrc
  4. Install the asdf version manager binary
  5. Run asdf install to install tool versions from ~/.tool-versions
  6. Set zsh as the login shell

Optional environment variables

Variable Default Description
DOTFILES_REPO_URL git@github.com:juan-lee/dotfiles.git Dotfiles repo URL
ASDF_VERSION 0.18.1 asdf release to install
DOTFILES_GIT_DIR $HOME/.cfg Bare repo location
DOTFILES_BACKUP_DIR $HOME/.config-backup Backup dir for conflicts

What's included

File Purpose
.zshrc Zsh config with Oh My Zsh, asdf PATH setup, and config alias
.gitconfig Git user identity
.tool-versions asdf tool versions (currently Node.js 22.14.0)
.asdfrc asdf settings (legacy version files, concurrency)
script/bootstrap Machine provisioning script

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors