I wanted to write a blog post, but in fact just go read the source here: https://github.com/paquiteau/dotfiles
Some inspiration:#
I am not the inventor or the sole user of this paradigm to manage my dot files, you may found interesting setup there:
- https://web.archive.org/web/20190924102437/https://expoundite.net/guides/dotfile-management
- https://github.com/search?q=language%3A%22Org%22%20dotfiles&type=repositories
- https://github.com/farlado/dotfiles
- https://github.com/lgfang/dotfiles
- https://github.com/ivoarch/.dot-org-files
- https://github.com/pniedzielski/dotfiles-ng
- https://writepermission.com/introducing-literate-dotfiles.html
- https://github.com/mitchty/dotfiles/tree/org-mode-all-the-things
- https://news.ycombinator.com/item?id=44812611
A few highlights#
Tangle to a tramp remote (to deploy dotfiles remotely):#
(defun tangle-remote (name)
"Tangle a org-src block to a remote file, using TRAMP"
(if (file-remote-p (buffer-file-name))
(let* ((tramp-con (tramp-dissect-file-name (buffer-file-name)))
(tramp-home (tramp-get-home-directory tramp-con))
(tramp-host (tramp-file-name-host tramp-con)))
(expand-file-name (format "/sshx:%s:%s/%s" tramp-host tramp-home name)))
(expand-file-name name (getenv "HOME"))
)
)Deployment script#
git clone git@github.com:paquiteau/dotfiles.git
emacs --batch -Q -l org --eval '(org-babel-tangle-file "config.org")'