Here's an example dotfiles repo:
~/.dotfiles asdf/ brew/ install.yml Brewfile python/ osx/ nodejs/ .npmrc.symlink install.yml fonts/
And here's an example
install.yml taken from the
script: npm i -g yarn deps: - asdf
Note: check out the example if you'd like to test this all out on a Docker container instance.
$ pip install dotrunner dotlinker
$ dotrunner ~/.dotfiles --dry-run
And finally, apply (this will obviously change your system!):
$ dotrunner ~/.dotfiles
Building a Dotfiles System with dotrunner
This layout describes a system that installs apps (with
homebrew), development tools (with
asdf), nodejs tools (with
install.sh) and some system defaults (with
asdf/ <----- a 'module' install.yml <----- a module install file. required. Asdffile brew/ install.yml Brewfile nodejs/ .npmrc.symlink <--- this is handled by dotlinker, see https://github.com/jondot/dotlinker install.yml install.sh osx/ install.yml set-defaults.sh
This system follows a few simple principles:
- Every directory is a module if it has an
install.ymlfile and it doesn't start with a dash (-).
- Each module can describe
deps(dependencies) and a
- Each module actions must be idempotent: running the same script multiple times will have the same result. In other words
dotrunnerwill happily run your scripts again on reruns/failures and you're responsible to do validation/checks in your scripts.
Here are a few examples of an
script: sh ./install.sh
Has depdendencies but no
script, it will use
./install script by default.
deps: - brew - osx
Has both dependencies and a
script which points to an executable script:
script: ./install.sh deps: - brew - osx
Fork, implement, add tests, pull request, get my everlasting thanks and a respectable place here :).
To all Contributors - you make this happen, thanks!