For system level… it’s definitely more complicated. I check /etc first and then then /usr dirs. If you’re using your system package manager there is generally a way to query it for that information, but it’s typically CLI based.
Or just use our lord and savior NixOS and configure everything in a single directory
For user specific files a lot of modern programs try to adhere to https://specifications.freedesktop.org/basedir-spec/latest/. You should set those environmental variables and check there first.
For system level… it’s definitely more complicated. I check
/etc
first and then then/usr
dirs. If you’re using your system package manager there is generally a way to query it for that information, but it’s typically CLI based.Or just use our lord and savior NixOS and configure everything in a single directory