back

by iLemming·7y ago·view on hn ↗
No, I've been hoping to write a blogpost about the process but been procrastinating for ages. Unfortunately I can't make my dotfile public - there are things in init that I rather keep private. Essentially you just need an .org file with source blocks with headings like this:

#+begin_src gitconfig :tangle ~/.gitconfig

You can even do it for different systems like so:

#+begin_src gitconfig :tangle (when (eq system-type 'darwin) "~/.gitconfig")

if you need file to be tangled in nested dirs you can add this header:

:mkdirp yes

if you need the content to be encrypted:

#+begin_src emacs-lisp :tangle ~/.authinfo.gpg :mkdirp yes # -- epa-file-encrypt-to: ("your-email@email.com") -- #+end_src