sloria/dotfiles
About
sloria's dotfiles as Ansible roles
Developer ToolsWhat you can do
- zsh configured with prezto.
- python managed with uv
- 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
Measured star growth
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Originaldotfiles
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.
a few neat features
- 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
prerequisites
- homebrew (If on macOS) - Install this first
- git:
brew install git - ansible >= 1.6:
brew install ansible
install
- 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.
Install ansible-galaxy roles
ansible-galaxy role install -r requirements.yaml
configure what gets installed
cross platform packages
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 and apps
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:
- qrtool
# ...
mac_cask_packages:
- 1password
# ...
roles
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.
run the install script
After configuring the packages you want, run dot-local, a shell script that thinly wraps ansible run.
./bin/dot-local
authenticating with github
You 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-git
updating your local environment
Once you have the dotfiles installed you can run the following command to rerun the ansible playbook:
dot-local
You can optionally pass role names
dot-local git python
creating and provisioning OrbStack VMs
dot-vm mybox
# Creates an debian VM called "mybox"
To SSH:
ssh mybox
updating your dotfiles repo
To keep your fork up to date with the sloria fork:
git remote add sloria https://github.com/sloria/dotfiles.git
git pull sloria master
commands
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
special files
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.
notes
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.
troubleshooting
If you get an error about Xcode command-line tools, you may need to run
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
license
Explore related projects
Loading…