“DotFiles” Home Configuration

A person’s dotfiles are all the files that begin with a . in Linux/UNIX. These usually contain personalizations and customizations of a person’s work environment.

The term dotfiles is really old and since more things than ever are going in .config it makes less and less sense.

Backing up these important files – usually with GIT – is pretty important to do so that you can easily setup a command-line environment from any machine on the Internet simply by cloning the GIT repository and running a setup or install command of your own creation.

Frequently a dotfiles setup is combined with a private repo containing private data so that the dotfiles repo can be made public and referred to by others looking to pilfer cool ideas about how to make their own dotfiles better. This is a long-standing Linux tradition. Creating one’s own dotfiles is something of a right of passage in the Linux community as demonstrated by the >10,000 dotfiles repos on GitHub/GitLab.

Many Over Mono

Rather recently (March 2019) as I was porting and revamping my dotfiles configuration and felt like I was being sucked into my own form of package management. I had the good fortune to realize that the monolithic approach to configuration management — even for a simple personal home configuration setup — is just completely broken and — more importantly — that GitLab provides a better solution using GitLab subgroups (not available on GitHub).

I started to identify the different logical components of configuration and bundle each into a separate, small GitLab project within a Configuration (config) subgroup. Then, as I learned more about Git submodules (which I admit I had put off really using a lot), I realized you could make other projects that encapsulated the config projects creating sort of a parent config project for different system profiles, for example, one for Raspberry Pi, one for Mac, one for Mint. This meant that my massive single .bashrc, for example, didn’t have to have all the different branching logic trying to detect what system it is running on.

This massively simplifies personal configuration management.

Installs Too

A lot of beginners think they are just saving off their .vimrc and .tmux and .bashrc and company. What they fail to realize is they actually want to reconfigure a system from scratch if needed. They want what I’ll call a smart backup that can work on any target operating system they might need to turn into a functional workstation quickly.

This means installs. There are always a bunch of installs you still need to do after you setup a system. Each is in a different package repo, or in a .deb file, or at some URL, or needs to be built from scratch. Each needs to be further personalized to work for you with tokens, password, and more (which is why you absolutely need a private repo as well rather than hard-coding that stuff into anything).

When you add installs to the mix you have updates and removals as well.

At that point you actually do have a pseudo packaging system, but it is more focused on the install, update, and remove functions which can be consistently scripted.

Because each has its own project under your config group each can be managed like a package even though it is really not a package by itself.

By the way, this is why the term dotfiles is so broken and archaic. It is never just dotfiles that you need. You need to include application installation and customization as well.

Not As Much Work As You Think

At first this seems like a lot of work to organize, but it actually is not — especially if you are using something as simple as my save function for GitLab that will turn any directory full of stuff into a private GitLab project that you can make public later if you wish.