/dotfiles

Local development environment setup via dotfiles, Homebrew installations & macOS customization

Primary LanguageShellMIT LicenseMIT

What is it?

A curated list of .dotfiles I use for my local development environment. This repository intended to consolidate and manage commonly used .dotfiles into a single place backed by a git repository.
It creates symlinks from dotfiles directory in the following manner:

  • ~/.dotfiles/.dotfiles-config - directories paths of dotfiles repo and .dotfiles symlinks + reload symlinks function
  • ~/.dotfiles/managed/*.* - content to symlink across all machines
  • ~/.dotfiles/custom/*.* - content to symlink in specific machines e.g. work related / personal etc..

Additionally, this repository contains:

  • Homebrew installation script for common packages and casks that I use
  • macOS custom KeyBindings, Finder customizations, keyboard preferences and other overrides

Getting Started

List of available make commands:

  1. dotfiles - create/remove dotfiles symlinks to/from this repo
  2. brew - (optional) install commonly used Homebrew packages and casks
  3. mac - (optional) macOS custom KeyBindings, Finder customizations, keyboard preferences and other overrides
  4. all - (optional) execute mac, dotfiles and brew in this order
  5. help - (optional) get available actions

Customization

Custom

Just add any custom dotfile to <repo-root>/dotfiles/custom/*.* and it'll be sourced on every new shell.

Managed

For a managed content to be added across all machines using this dotfiles repo, add it to the relevant file:

  • .aliases
  • .functions
  • .exports

Transient Files

If files in <repo-root>/dotfiles/transient directory exists, they will be sourced along but won't get symlinked anywhere.
You can use this to export ENV vars with sensitive information such as secrets to become available on any newly opened shells. Files under transient folder are git ignored by default to prevent from committing to a public repository.

⚠️ Warning
It is not recommended to commit the .secrets transient file as it may contain sensitive information.
.
├── ...
├── dotfiles
│   └── custom  # dotfiles to symlink in specific machines e.g. work related / personal etc..
│       ├── .my-company
│       └── ...
│   └── home  # files that should get symlinked in HOME folder
│       ├── .gitignore_global
│       └── ...
│   └── managed  # dotfiles to symlink across all machines
│       ├── .aliases
│       └── ...
│   └── shell  # shell run commands to gets sourced on new shell session (+run command to load dotfiles)
│       ├── .zshrc
│       └── ...
│   └── transient # content that gets sourced on new shell session but not symlinked
│       └── .secrets
│   └── .dotfiles.sh  # dotfiles install/uninstall management script
└── ...

Quick Start Guide

make dotfiles (install dotfiles)

Show dotfiles-install

make dotfiles (uninstall dotfiles)

Show dotfiles-uninstall

make brew (install Homebrew packages/casks)

Show brew

make mac (override macOS with custom setting)

Show mac

Credits: Logo created by Joel Glovier