Skip to main content
  1. Posts/

Managing all my dotfiles with single file

·1 min
Pierre-Antoine Comby
Author
Pierre-Antoine Comby
PhD in AI and Neuroimaging
Table of Contents

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:

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")'