Just cd ~ && git clone [email protected]:sohkai/.dotfiles.git --recurse-submodules && ~/.dotfiles/install.sh
.
At the end, you'll still need to do some things by hand to complete the install. This includes things such as:
- Uploading your git SSH key to Github
- Setting up a git signing key in
~/.gitconfig
- Setting up a homebrew's git token
(
HOMEBREW_GITHUB_API_TOKEN
) in your resulting~/.profile_env
. - Adding any other local configuration (e.g. aliases, paths, etc) to your resulting
~/.bashrc
,~/.zshrc
,~/.profile_env
,~/.language_ver
, etc.
Make sure to pay attention to the messages at the end for further instructions.
NOTES:
- This repo does not need to be cloned in a particular directory (it'll set up a
$DOTFILES
environment variable during installation), but I like to use~/.dotfiles/
and all example paths here will assume you also choose this location install.sh
is most useful on OSX (due to most things being installed withbrew
for now)- On OSX, you should probably install Xcode, or at least the Xcode CLI tools
(
xcode-select --install
), before runninginstall.sh
What's included (everything with a .local
suffix is copied to ~/
without the suffix):
- Setting up homebrew, Cask, and then a whole bunch of goodies
- Languages:
- Bash profile and inputrc
- Zsh and Zim profile
- Tmux
- vimrc
- git (and Github SSH key)
- mercurial
- And lots more
The locally installed shell files will ultimately refer back to the configuration files in this directory.
For bash, the general source order is:
~/.bash_profile (loaded by bash on login; always on OSX)
~/.bashrc
~/.init_env
~/.dotfiles/bash.d/bashrc
~/.dotfiles/profile.d/*.sh
~/.dotfiles/bash.d/*.sh
~/.dotfiles/profile.d/after*.sh
~/.profilerc
~/.languagerc
For zsh, the general source order is:
~/.zshenv
(loaded by zsh)~/.init_env
~/.zlogin
(loaded by zsh on login; always on OSX)~/.zshrc
~/.dotfiles/zsh.d/zshrc
~/.zimrc
~/.dotfiles/zsh.d/zimrc
~/.dotfiles/zsh.d/zplugrc
~/.dotfiles/profile.d/*.sh
~/.dotfiles/zsh.d/*.zsh
~/.dotfiles/profile.d/after*.sh
~/.profilerc
~/.languagerc
Bash and zsh both source their paths, environment settings, aliases, functions, and other
configuration details from the *.sh
or *.zsh
files found in the shared
profile.d/
folder as well as their own respective folder. The profile.d/
files
are loaded first before any corresponding bash.d/
or zsh.d/
files are
loaded; this allows the files in bash.d/
or zsh.d/
to override any inherited setting from
profile.d/
. Files in profile.d/after/
, bash.d/after/
,
and zsh.d/after/
are run after all other files in profile.d
, bash.d
, and
zsh.
are sourced and can be used to reset non-local settings (e.g. an alias set by a sourced
plugin).
NOTE: After installation, the .profilerc
and .languagerc
files do not link to a
corresponding file in this repo; as such, they should contain only local configuration.
Specifically, the .profilerc
file should be used for general environment settings (e.g. local
aliases, environments, etc) and .languagerc
should specify defaults for any loaded language
version managers. Due to the slow speed of some version managers (ahem nvm
ahem),
.languagerc
is only loaded at startup if confirmed.
In general, keep local configurations to one of the local files. Only modify the files in this repo when you know you would like to also propagate that change to all environments.
For the most part, if you do make a change to a file in this repo, you will be able to propagate that change by resourcing the corresponding local configuration file. However, there are a few configuration files that are not able to be loaded from another file or are designed to only be locally placed; changes to these files will only come into effect if they are made locally and will have to be duplicated into this repo. A list of files to be wary of when changing:
.bash_profile
and.inputrc
(if you want to make modifications to these, make sure you have a good reason not to change their tracked version instead).profilerc
and.languagerc
(although these should ONLY ever contain local configuration, so you shouldn't need to duplicate anything other than a template for these files).gitconfig
- Note that git doesn't support environment variable expansion in its config files, so the
global config and ignore files are also symlinked to the home directory (as
.gitconfig_global
and.gitignore_global
)
- Note that git doesn't support environment variable expansion in its config files, so the
global config and ignore files are also symlinked to the home directory (as
.hgrc
and.hgignore_global
.npmrc
.pypirc
.rvmrc
.vimrc
and.gvimrc
.zshrc
,.zshenv
,.zlogin
, and.zimrc