sloria's dotfiles, rewritten as Ansible roles. Sets up my local and remote development environments with a single command. Supports macOS and OrbStack VMs running Debian.
- zsh configured with prezto.
- python managed with uv
- neovim/lazyvim
- pluggable. Everything is optional. Fork this. Remove what you don't use. Configure what you do use.
- manages cross-platform packages and macOS-only packages
- useful git aliases
- idempotency, thanks to Ansible
- optional support for provisioning OrbStack VMs
- homebrew (If on macOS) - Install this first
- git:
brew install git - ansible >= 1.6:
brew install ansible
- Fork this repo.
- Clone your fork.
# Replace git url with your fork
# NOTE: It is important that you clone to ~/dotfiles
git clone https://github.com/YOU/dotfiles.git ~/dotfiles
cd ~/dotfiles- Update the following variables in
group_vars/all.yaml(at a minimum)git_name: Your name, which will be attached to commit messages, e.g. "Steven Loria"git_email: Your git email address.
Cross-platform utilities that get can be installed by package managers (homebrew, apt) go in group_vars/all.yaml. Edit utilities_packages:
utilities_packages:
- curl
- wget
# ...macOS-only packages to install with homebrew go in either
group_vars/local.yaml (for local installation) or group_vars/remote.yaml (for the mac mini). Edit mac_homebrew_packages and mac_cask_packages.
mac_homebrew_packages:
- wifi-password
- qrtool
# ...
mac_cask_packages:
- 1password
# ...roles encapsulate installation of tools as well as related shell scripts (for setting environment variables, aliases, functions, completion).
Add and edit roles in the roles/ directory and their corresponding entry in provision.yaml as you see fit.
After configuring the packages you want, run dot-local, a shell script that thinly wraps ansible run.
./bin/dot-localYou won't be able to push to repos until you authenticate with GitHub.
You can use gh for this, which should have been installed by dot-bootstrap above.
gh auth login
gh auth setup-gitOnce you have the dotfiles installed you can run the following command to rerun the ansible playbook:
dot-localYou can optionally pass role names
dot-local git pythondot-vm mybox
# Creates an debian VM called "mybox"To SSH:
ssh myboxTo keep your fork up to date with the sloria fork:
git remote add sloria https://github.com/sloria/dotfiles.git
git pull sloria master
There are three main commands in the bin directory for setting up and updating development environments:
dot-local: sets up local environmentdot-remote: sets up remote environmentdot-vm: creates and provisions OrbStack VMs
All configuration is done in ~/dotfiles. Each role may contain (in addition to the typical ansible directories and files) a number of special files
- role/*.zsh: Any files ending in
.zshget loaded into your environment. - bin/: Anything in
bin/will get added to your$PATHand be made available everywhere.
vscode
Use built-in Settings Sync to sync VSCode settings.
macOS keyboard settings
There are a few keyboard customizations that must be done manually:
- System Settings > Keyboard > Turn "Key repeat rate" and "Delay until repeat" to their highest settings.
- System Settings > Keyboard > Keyboard Shortcuts > Modifier Keys > Change Caps Lock key to Control.
mac mini
I also use this repo to configure my Mac Mini server which I have running in headless mode. My setup is documented in docs/MAC_MINI.md.
If you get an error about Xcode command-line tools, you may need to run
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

