Monolithic dotfiles or portable dotfiles?

Last edited: 25th April 2026

Just a few months ago, I have been working on my configuration files, also known as dotfiles (I may upload them again one day). During my tenure at trying to figure out how people configure their applications and take inspiration, I noticed a pattern in which other people configured their applications.

Application's settings are stored via a configuration file or "config" for short. This will is read once the application starts to save progress or settings back from another clossed session. Unix applications, especially the ones in the terminal, made this process very human-readable, allowing to directly edit the configuration file with a text editor. In instances such as Neovim or Qutebrowser, they use real programming languages, meaning you can write code inside the configuration file, and you will be able to take the configuration file and share it. This is why I like to call configuration files "portable".

However, as you begin to set many options, you will have to resort to some sort of structure, otherwise it will be harder to read the configuration file. I personally achieve this by stripping all comments, using a similar format for every configuration file (keybindings first, then general settings, then appearance), keeping indentation spacing low (2 spaces), and using empty lines to separate different types of settings. Another way to organise your configuration files is by separating configuration files based on different types of settings or purposes. I call this way "monolithic" dotfiles.

So, we have monolithic dotfiles (multiple config files) and portable dotfiles (single config file per application). After learning about those paths, I wrapped my head around it.

Portable dotfiles are amazing. It is just one file you can easily upload and move around. You do not need to think about where to exactly place it, and it keeps is all very clear. Monolithic dotfiles, on the other hand, work well if you either have a portable configuration file that is just too large (1000+ lines of code) or if you want to refrain hardcoded custom settings.

A good example would be dracut. I have saved my cmdline in a separate config file because it includes the UUIDs for my encrypted LUKS drives, so I separated the cmdline configuration from the regular dracut configuration. Another great use case is in messaging clients where you could hide personal accounts by creating an "include" function in the config file you want to upload.

It boils down to preference, however, I think portable dotfiles work better in more instances. The reason why I stopped checking out other people's dotfiles is because they make it so complicated and everything breaks if you did not include the secret config file at ~/.config/shell/profile. I personally believe stuff like this should be avoided, and monolithic dotfiles should only be used in very niche use cases as mentioned above.