Sets up a full local development environment with a single command.
Support for OS X and Debian.
Tested on:
- fish shell with ohmyfish and bobthefish theme
- nice fonts for the terminal and coding
- python2, python3, pipx (for managing python CLIs), pyenv (for managing Python versions), and pyenv-virtualenv (for managing virtualenvs)
- a tmux.conf that's pretty neat.
- bat as a more modern replacement for cat
- exa as a more modern replacement for ls
- docker
- go-lang
- github hub tool
- node-js
- jetbrains-toolbox and pycharm
- Mac packages installed with [homebrew][https://brew.sh/]. Mac apps installed with [homebrew-cask][https://github.com/Homebrew/homebrew-cask] and mas.
- Basic Ubuntu packages from both APT and Snap and ROS setup
- Useful git aliases
- Optional git commit signing with GPG
- Roles are unit tested and integration tested by molecule.
- Pluggable. Everything is optional. Fork this. Remove what you don't use. Configure what you do use.
Ansible version >= 2.8 is required.
OS X:
- homebrew (If on macOS) - Install this first
- git:
brew install git - ansible >= 1.6:
brew install ansible
Ubuntu:
- Updated apt cache:
apt update - git:
apt install git - ansible:
apt install ansible
Note: On Ubuntu systems, Ansible can be updated as follows:
sudo apt-add-repository -yu ppa:ansible/ansible sudo apt-get 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/local(at a minimum)full_name: Your name, which will be attached to commit messages, e.g. "Levko Ivanchuk"git_user: Your Github username.git_email: Your git email address.
- Optional, but recommended: Update
group_vars/localwith the programs you want installed by homebrew, homebrew-cask, and npm.mac_homebrew_packages: Utilities that don't get installed by the roles.mac_cask_packages: Mac Apps you want installed with homebrew-cask.
- Optional, but recommended: Update
group_vars/localwith the programs you want installed by APT and Snap (when running on Ubuntu).ubuntu_apt_packages: Utilities that don't get installed by the roles.ubuntu_snap_packages: Ubuntu apps you want installed with snap.
- Edit
local_env.ymlas you see fit. Remove any roles you don't use. Edit roles that you do use.
On source machine with your private key, do the following:
# Bash syntax here
ID=FF7E2F5B2137632F # Replace this with your key ID
gpg --export ${ID} > public.asc
gpg --export-secret-key ${ID} > private.ascTransfer those two two files to your target machine and run:
# Bash syntax here
gpg --import public.asc
gpg --import private.asc
export GIT_SIGNING_KEY_ID=FF7E2F5B2137632F # Same key ID as on source machineNote: After running the dot-bootstrap script, you should put
export GIT_SIGNING_KEY_ID=FF7E2F5B2137632Fline in ~/.localrc or ~/.config/fish/config.fish.
./bin/dot-bootstrapOnce you have the dotfiles installed you can run the following command to rerun the ansible playbook:
dot-updateYou can optionally pass role names
dot-update git pythonTo keep your fork up to date with the lewkoo fork:
git remote add lewkoo https://github.com/lewkoo/dotfiles.git
git pull lewkoo master
All tests must be run under a new virtual environment with these installed:
pip install "molecule[docker,lint]"Run Unit tests:
./bin/testRun Integration tests:
./bin/testThere are three main commands in the bin directory for setting up and updating development environments:
dot-bootstrap: sets up local environment by executing all roles inlocal_env.yml.dot-update: updates local environment by executing all roles inlocal_env.ymlexcept for the ones tagged with "bootstrap".
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.
- Full testing on Mac OS X