- These dotfiles are managed using dotbot and git submodules.
- Feel free to skip the goals/requirements. It's mostly me rambling through my process to make sure I'm not forgetting things.
- I maintain this repo as my dotfiles.
- You're quite welcome to pick and choose from my settings, but you probably shouldn't use them as-is because they'll likely not suit your needs.
- You're welcome to make suggestions/raise issues/etc.
I started this project as a section for a "book" (link someday?), the topic of which is how to improve processes endemic to software development.
Part of my process for any project, software or otherwise, is to establish a small set of goals that will help me get started. As I begin work, the complexities of the work unfold and I rework the goals as often as needed to keep things moving and focused on the next big task.
My initial goals were:
- Keep my secrets safe.
- Get my dotfiles on github.
I moved my secrets and cleaned up my files to some extent, but after a few days research into available dotfiles tools, my goals changed to:
- Be able to document/see changes (git).
- Load configs for multiple envs (dotbot).
- Keep secrets protected, yet in sync with the rest of the system (dotbot + custom bash functions).
- Allow for easy integration of other projects (git submodules).
Now almost 3 weeks later I finally have my secrets buttoned up and am making an initial commit
[TODO]
-
Fork this repo in github (unless you are me).
-
Clone the forked repo to $HOME/.dotfiles:
~$ git clone --recursive https://github.com/sarandi/dotfiles ~/.dotfiles
To use these dotfiles, use dotbot to load a set of configuration files.
-
You can install one or more profiles with:
./install-profile <profile> [<configs...>]
-
Single configurations can be installed with:
./install-standalone <configs...>
-
To unload your current configs, simply install with the set you wish to be using; The install scripts are idempotent, so the old set will be cleaned and only the new set will be used.
My .bash_profile makes resources available by using the source
command. I'm avoiding the use of source
alias . <filename>
in preference of clarity over arcanity.
-
Add/remove files by grouping them into arrays and passing to setSources() for example, in .bash_profile:
main=($HOME/.{path,apps,filesystem,utils,macos}); loadSources "$(echo ${main[*]})";
- My sourcing function has been abstracted from the more typical form, as seen in Mathias Bynen's bash_profile source loading
-
If you're updating already installed and sourced files, you don't need to run
./install-profile profile(s)
but you do need to either:- Start a new shell
- via your terminal (cmd+T in iTerm).
- in the same shell: issue
exec bash -l
. 1
- Source the file in manually if you don't want to start a new shell.
- This also includes moving files.
- Start a new shell
[TODO]
- Update meta/base.yaml to set defaults and any shared configurations.
- Add/update meta/profiles/<profile> to define profile.
- Add/update meta/configs/<config.yaml> to symlink configs.
- Stage/commit/push changes
- or cherrypick commits you like from others.
Please refer to dotbot's configuration for how to structure your configuration files.
More specifically, I'm using the advanced setup outlined here. However, the initial install for this isn't yet documented completely, so I'm outlining it in the following section.
-
Create your .dotfile directory - I use
.dotfiles
. -
In .dotfiles root, create and populate a
.gitignore
file. -
In .dotfiles root, initiate git with
git init
. -
Get the advanced dotbot install scripts and save them to .dotbot root.
- install-profile
- install-standalone
- N.B. Notice these don't use a file extension.
-
In .dotfile root, create a config directory.
- The default name is meta.
- If you change from meta, you will have to update the
META_DIR
variables in both the install scripts.
-
Inside of meta create two more directories:
profiles
andconfigs
-
Your user should have read/write/execute privileges for all files and directories.
- You can set this recursively with
chmod -R 700 ~/.dotfiles
- or you can alter to fit your needs - I usually use
755
.
- You can set this recursively with
-
In .dotfile root, install the dotbot git submodule:
# Using ssh git submodule add [email protected]:anishathalye/dotbot.git meta
-
Setup your configuration files as follows.
Dotbot accepts both YAML or JSON. My files exclusively use YAML because though it is whitespace dependent, I find managing whitespace easier than managing matching brackets. This is a personal preference, so feel free to change things for your own configurations.
-
cd
to the cloned directory -
Setup meta/configs/config.yaml files for each set of configurations.
-
This follows the convention set by dotbot:
- link: ~/.macos: os/macos/.macos ~/.tmux-os.conf: os/macos/.macos.tmux.conf # vim: set filetype=yaml ts=4 sw=4 tw=0 et :
-
Task options: default, link, clean, shell
-
-
Setup
meta/profiles/<profile>
files for each profile.-
This is simply an extensionless list of config files:
bin apps bash filesystem macos path utils vim
-
-
Follow the directions in Setup#Installing and Setup#Using to test and use your configs.
As stated initially I am completely open to constructive feedback and dialog. If you have a case to make for a particular change - especially if you think may improve this configuation - please feel free to open an issue.
If you want to do the work yourself, you can fork/clone/develop and issue a pull request. In any case I reserve the right to ultimately decline the change, though if so I'll do my best to provide a good reason.
This project is cobbled together by many ideas gleaned from the following sources. Thank you to all their authors and contributors.
- https://github.com/mathiasbynens/dotfiles
- https://github.com/paulirish/dotfiles
- https://github.com/magicmonty/dotfiles_dotbot
- https://github.com/vsund/dotfiles
- https://github.com/vbrandl/dotfiles
TODOs are now being logged at [TODO.md]
Copyright (c) 2012-2019 Sarandos Klikizos. Released under the MIT License. See [LICENSE.md] for details.