Giter VIP home page Giter VIP logo

dotfiles-ansible's Introduction

dotfiles

jnsbl's dotfiles, rewritten as Ansible roles. Fully supports macOS. Red Hat and Debian support is good but not as complete.

Features

  • fish (default shell) configured with fisherman.
  • zsh configured with prezto.
  • nice fonts for the terminal and coding.
  • iterm2 profile (w/ hotkey, themes, etc.)
  • neovim with vim-plug for plugin management.
  • yabai tiling window manager controlled by skhd. (don't use it anymore but it can be enabled and installed, eventually)
  • pluggable. Everything is optional. Fork this. Remove what you don't use. Configure what you do use.
  • Mac packages installed with homebrew. Mac apps installed with homebrew-cask.

Prerequisites (install these first)

  • ansible >= 1.6
  • homebrew (if on macOS)
  • git (homebrew installable on macOS)

Installation

  • 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
# Install required Ansible roles
$ sudo ansible-galaxy install -r requirements.yml
  • Update the following variables in group_vars/local (at a minimum)
    • full_name: Your name, which will be attached to commit messages, e.g. "Tom Driscoll"
    • git_user: Your Github username.
    • git_email: Your git email address.
  • Optional, but recommended: Update group_vars/local with the programs you want installed by homebrew, homebrew-cask, mas, and npm.
    • osx_homebrew_packages: Utilities that don't get installed by the roles.
    • osx_cask_packages: Mac Apps you want installed with homebrew-cask.
    • mas_installed_apps: Mac Apps you want installed from Mac App Store.
    • npm_global_packages: Node utilities.
    • fisherman_plugins: Fisherman plugins.
  • Edit local_env.yml as you see fit. Remove any roles you don't use. Edit roles that you do use.
  • Run the installation script.
$ ./bin/dot-bootstrap

Updating

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

$ dot

Commands

There are two main commands in the bin directory for setting up and updating development environments:

  • dot-bootstrap: sets up local environment by executing all roles in local_env.yml.
  • dot: updates local environment by executing all roles in local_env.yml except for the ones tagged with bootstrap.
  • dot-tag: updates local environment by executing all roles in local_env.yml tagged with the specified tag.

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 .zsh get loaded into your environment.
  • bin/: Anything in bin/ will get added to your $PATH and be made available everywhere.

Notes

iTerm2

To import the iterm2 profile, go to your iterm2 preferences, and enable "Load preferences from custom folder" and select the iterm2 folder in the misc/ directory.

iterm2 profile

macOS keyboard settings

There are a few keyboard customizations that must be done manually:

  • Turning repeat speed up to 11.

Keyboard settings

  • Mapping Caps Lock to Ctrl.

Modifier keys

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 --HEAD --with-override-system-vim --with-python

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/jnsbl/dotfiles/master/roles/vim/files/vimrc

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

TODO

  • Full Debian and Red Hat support
  • Add more options to dot script, e.g. for skipping tasks

License

MIT

dotfiles-ansible's People

Contributors

asmacdo avatar jnsbl avatar sloria avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.