config: initialize XDG basedirs for default host config

Not much parts of the system set this so we'll do it ourselves.
This commit is contained in:
Gabriel Arazas 2023-12-13 09:59:37 +08:00
parent 3da9dc89fa
commit 231200546d
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC

View File

@ -148,6 +148,14 @@
# Some defaults for evaluating modules.
_module.check = true;
# Initialize some of the XDG base directories ourselves since it is used by NIX_PROFILES to properly link some of them.
environment.sessionVariables = {
XDG_CACHE_HOME = "$HOME/.cache";
XDG_CONFIG_HOME = "$HOME/.config";
XDG_DATA_HOME = "$HOME/.local/share";
XDG_STATE_HOME = "$HOME/.local/state";
};
# Only use imports as minimally as possible with the absolute
# requirements of a host. On second thought, only on flakes with
# optional NixOS modules.