kuhy / .dotfiles

Kuhy's literate dotfiles.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dotfiles

Kuhy’s literate dotfiles. ./screenshot.png

Contents

Repository contains following configuration files:

How does it work?

Every part of my system is configured using some Org Mode file. Each file contains textual description alongside code blocks containing the actual configuration. These code blocks can be tangled (extracted) into the dotfiles at specified path using Babel. The whole setup requires only Emacs with default packages.

Org files contain the following header arguments:

  • :tangle file_path which specifies the actual path to the dotfile
  • :noweb tangle to allow expansion of code block’s references
  • :comments yes to tangle also comments
  • :mkdirp yes to allow creating parent directories for tangled files
  • :tangle-mode (identity #o440) to set permissions of tangled files

Some files such as variables.org and secrets.org contains code blocks which are shared between multiple Org files (these code blocks are annotated with #+NAME: block_id); because of that, multiple applications can share the same color scheme, etc. These files are included in other files using #+INCLUDE: file_path statements. Included source blocks are then referenced in code like this: <<block_id>>. To prevent tangling definitions of shared source blocks, the :tangle no option is used. Because of that, files which are including these shared files must use #+OPTIONS: prop:t; this ensures that custom properties (like :tangle no) are also included in destination files.

File secrets.org contains some sensitive data, therefore content of this file is encrypted using Org Crypt (headers are annotated with :crypt: tag).

Unfortunately, built-in function org-babel-tangle which is responsible for tangling, does not work correctly with #+INCLUDE statements and encrypted files. Because of that, I created a simple script which overcomes those shortcomings.

About

Kuhy's literate dotfiles.

License:GNU General Public License v3.0


Languages

Language:Shell 100.0%