Ok this may not be a very concrete question, and is perhaps subject to taste, yet I'm struggling to get this right so here it goes.
I have a computer.
This computer has linux on it (thank god). Arch Linux to be specific (with awesome
wm).
I am the single user on this computer.
As to good practice I've set up two users: the root
user and the everyday use romeovs
user. This way I only use permissions when needed (using sudo
for example).
Over the years I have been pimping out my software suite, adding a bunch of applications to this computer. Notably: vim
, git
, mpc
, mutt
, calcurse
, ufw
, …
Now here is the rub: which of these applications' config files do I use? All of these supply an /etc
-based global configuration file, that affects all users, as well as a local ~/.config
(or, sadly, ~/
) config options.
I've always worked using the local configuration setups, because this felt more natural. But as I grow more familiar with my computer, I feel this somehow lacks elegance. The contra's to this approach are:
-
dicrepancy when switching to
root
user, even withsudo
(e.g. when usingvim
) -
will not always work, e.g. when loading deamons from the arch linux
DEAMONS
array they are run by theroot
user and thus don't pick up local user configs. -
major
$HOME
directory clutter. Sadly there are very few apps that adhere to the$XDG_CONFIG_HOME
philosophy.
Benefits are:
-
stuff is local, which feels more in the lines of the permissions splitting between
root
andromeovs
. -
quick and easy acces to the files. no need to
sudo
to edit them. -
easier for
git
tracking of the config files. -
somehow feels safer: a user can screw stuff up without messign with the machine's global settings.
-
it is more "a-package-update-may-overwite-my-config"-proof
Let's get conrete:
What is the de-facto standard to split configuration on a single user machine, especially for the system maintainer (single-user)?
Best Answer
One day you're going to change your computer, or to give someone else (a family member, for example) an account on your computer.
/etc
.Your arguments against putting configuration files in the home directory don't really hold water:
sudo
keeps theHOME
environment variable (unless you've told it not to). So your programs will keep reading their settings from your home directory./etc
, not through environment variables or through files in your home directory.$HOME
is supposed to have a lot of dot files. That's whyls
doesn't show them.