Home

Awesome

dotfiles

sloria's dotfiles, rewritten as Ansible roles. Sets up a full local development environment with a single command.

Fully supports macOS. Red Hat and Debian support is good but not as complete.

a few neat features

prerequisites

install

# 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
export GIT_SIGNING_KEY_ID=631262B829DDB506

Note: After running the dot-bootstrap script, you should put the above line in ~/.localrc.

./bin/dot-bootstrap

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

updating your local environment

Once you have the dotfiles installed you can run the following command to rerun the ansible playbook:

dot-update

You can optionally pass role names

dot-update git python

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:

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

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:

Keyboard settings

Modifier keys

login message

You can add a message to the login screen using the following command:

sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText "This laptop is connected to an iCloud account and is valueless if lost. Contact (123) 456-7890 if found. Reward included."

what if I only want your vim?

First make sure you have a sane vim compiled. On macOS, the following will do:

brew install macvim

The following commands will install vim-plug and download my .vimrc.

After backing up your ~/.vim directory and ~/.vimrc:

mkdir -p ~/.vim/autoload
curl -fLo ~/.vim/autoload/plug.vim https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
curl -fLo ~/.vimrc https://raw.githubusercontent.com/sloria/dotfiles/master/roles/vim/files/vimrc

You will now be able to open vim and run :PlugInstall to install all plugins.

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

If pyenv versions fail to install, try the steps here:

https://github.com/pyenv/pyenv/issues/1219#issuecomment-459333831

If python environments break after upgrading brew-installed python, rehash pyenv and re-install pipx environments

pyenv rehash


mv ~/.local/bin ~/.local/bin.bak
mv ~/.local/pipx ~/.local/pipx.bak

dot-update pipx

todo

license

MIT Licensed.