Personal dotfiles and development environment configuration for macOS and Linux workstations.
For setting up a new development machine, run these commands in order:
# 1. Install Python environment (pyenv + Poetry)
make setup
# 2. Install dotfiles and configurations
make install
# 3. Verify everything is working
./scripts/verify-setup.shThat's it! Open a new terminal and you're ready to go.
- pyenv - Python version manager
- Python 3.11.6 - Pinned version from
.python-version - Poetry - Python dependency and package manager
- GitHub CLI (gh) - For creating PRs from terminal (optional but recommended)
- Shell configs - Bash and Zsh configurations with aliases and functions
- Git config - Enhanced git configuration with GPG signing support
- Vim setup - Vim with Vundle plugin manager and pre-configured plugins
- iTerm2 settings - Terminal configuration (macOS only)
- Additional dotfiles -
.aliases,.func,.inputrc,.screenrc
macOS:
# Install Homebrew (if not already installed)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install Xcode Command Line Tools
xcode-select --installLinux:
- Your distribution's package manager will be used automatically
- Supported: apt, dnf, yum, pacman
# Full setup (recommended for new machines)
make setup
# Or individual steps:
make deps # Install Homebrew dependencies
make pyenv-install # Install pyenv
make python-install # Install Python from .python-version
make poetry-install # Install Poetry
make configure-poetry # Configure Poetry settingsWhat this does:
- Installs build dependencies (xz, openssl, readline) via Homebrew
- Installs
pyenvfor Python version management - Builds Python 3.11.6 with proper lzma/compression support
- Installs Poetry using the pyenv-managed Python
- Configures Poetry to use pyenv's active Python version
# Install everything
make install
# Or individual components:
make dotfiles # Symlink dotfiles to home directory
make zsh # Install zsh configuration files
make vim # Install Vim with Vundle and plugins
make iterm-apply # Apply iTerm2 settings (macOS only)What this does:
- Creates symlinks from
~/to dotfiles in this repository - Installs Zsh configs:
~/.zshrcand~/.zshenv - Sets up Vim with Vundle plugin manager
- Installs Vim plugins for Python, Go, Terraform, Docker, etc.
- Applies iTerm2 configuration (macOS only)
After installation, verify everything is working:
./scripts/verify-setup.shThis checks:
- Shell configuration (zsh/bash)
- Git settings
- GitHub CLI authentication
- Python/pyenv/Poetry installation
- Vim setup
- Dotfiles symlinks
- Optional tools (Docker, kubectl, etc.)
Create ~/.boffline for private variables (API keys, work configs, etc.):
# Copy the example template
cp .boffline.example ~/.boffline
# Edit with your values
vim ~/.bofflineThe .boffline file is automatically sourced by .bashrc and is git-ignored.
Update your personal information in ~/.gitconfig after installation:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"For work-specific settings, create ~/.gitconfig.local:
# ~/.gitconfig.local
[user]
email = [email protected]Or use conditional includes for work directories:
# Add to ~/.gitconfig
[includeIf "gitdir:~/work/"]
path = ~/.gitconfig.workThe git config includes GPG signing via 1Password SSH. To set it up:
- Install 1Password and enable SSH agent
- Generate an SSH key in 1Password
- Update the signing key in
.gitconfig:git config --global user.signingkey "ssh-ed25519 YOUR_KEY_HERE"
Or disable GPG signing:
git config --global commit.gpgsign falseThis repository supports both Bash and Zsh. Zsh is recommended for modern setups.
Switch to Zsh (macOS default since Catalina):
chsh -s /bin/zshZsh Features:
- Oh-My-Zsh integration with plugins
- Git status in prompt
- Syntax highlighting and autosuggestions
- Enhanced completion
Common git aliases (see .aliases for full list):
gs # git status
gd # git diff
gl # git log
gpr # git pull --rebase
gp # git pushKubernetes shortcuts:
kc # kubectl
kn # kubens (switch namespace)
k # kubectl getAvailable functions (see .func for full list):
trash FILE # Move file to trash instead of rm
randomstring [LENGTH] # Generate random string
geoip IP # Get geolocation for IP addressUse the prq function (requires GitHub CLI):
# Create PR with auto-generated title and body
prq
# Create PR with custom title
prq "My PR Title"
# Create PR with title and body
prq "Title" "Description"
# Create PR against different base branch
prq "Title" "Description" develop- macOS - Primary platform, fully supported
- Linux - Supported via
scripts/setup.sh- Tested on: Ubuntu, Fedora, CentOS, Arch Linux
After changing iTerm2 settings:
make iterm-capture # Save current iTerm2 settings to repoTo change Python version:
# Update .python-version file
echo "3.12.0" > .python-version
# Reinstall Python
make python-installThe repository has two git config files:
.gitconfig- Active configuration (gets symlinked to~/.gitconfig)configs/git/gitconfig- Template/reference (for backup)
After running make dotfiles, ~/.gitconfig will link to the root .gitconfig.
For historical/reference purposes, alternative setup scripts exist:
scripts/setup-macos.sh- Standalone macOS setup scriptscripts/macos.sh- Interactive macOS setup with system preferencesscripts/setup.sh- Linux setup script
Note: The Makefile approach is now recommended and provides the same functionality with better integration.
If Python installation fails with lzma/compression errors:
# Install dependencies
brew install xz openssl readline
# Rebuild Python
pyenv uninstall 3.11.6
make python-installIf zsh configuration isn't loading:
# Ensure files are symlinked
make zsh
# Verify symlinks exist
ls -la ~/.zshrc ~/.zshenv
# Reload shell
source ~/.zshrc# Reinstall Vundle and plugins
make vim
# Or manually update plugins
vim +PluginInstall +qall# Authenticate with GitHub
gh auth login
# Verify authentication
gh auth statusThis repository configures:
- Shell: Bash, Zsh, Oh-My-Zsh
- Version Control: Git with GPG signing
- Python: pyenv, Poetry, flake8
- Editor: Vim with Vundle and extensive plugins
- Terminal: iTerm2 (macOS)
- Cloud/Containers: Docker, Kubernetes, Terraform
- CI/CD: GitHub Actions for macOS testing
This is a personal dotfiles repository, but feel free to:
- Fork for your own use
- Submit issues for bugs
- Suggest improvements via PRs
Personal configuration files - use at your own risk and customize to your needs.