Why does NixOS not set $XDG_CONFIG_HOME by default?

I noticed that $XDG_CONFIG_HOME is not set to $HOME/.config which is a convention in most modern Linux distributions AFAIK.

Is this an oversight or are user configurations also supposed to go into the nix store?

XDG_CONFIG_HOME has to default to $HOME/.config according to the specification, so I do not think setting it to that would provide any upside?

1 Like

Hmm, you’re right. I think I got confused by the statement made by the Byobu Documentation

Note that BYOBU_CONFIG_DIR=$XDG_CONFIG_HOME/byobu if defined, and $HOME/.byobu otherwise.

It does not follow the XDG Base Directory Specification then, because it should just use $HOME/.config/byobu by default, right?

Yeah, that sounds strange. At least tmux correctly reads ~/.config/tmux/tmux.conf for me. :slight_smile:

1 Like

Yes, that’s upstream not following the specification.

1 Like

Related issue: Documentation: Set up XDG Base Directory environment variables · Issue #224525 · NixOS/nixpkgs · GitHub

1 Like