This repository has been archived on 2023-08-08. You can view files and clone it, but cannot push or open issues or pull requests.
nil/modules/system/xdg.nix

30 lines
963 B
Nix
Raw Normal View History

2021-12-15 05:11:38 +00:00
{ config, pkgs, ... }: {
2021-12-01 04:39:03 +00:00
home-manager.users.james = {
home.packages = with pkgs; [ xdg-utils xdg-launch ];
xdg.enable = true;
};
environment = {
sessionVariables = {
# These are the defaults, and xdg.enable does set them, but due to load
# order, they're not set before environment.variables are set, which could
# cause race conditions.
XDG_CACHE_HOME = "$HOME/.cache";
XDG_CONFIG_HOME = "$HOME/.config";
XDG_DATA_HOME = "$HOME/.local/share";
XDG_BIN_HOME = "$HOME/.local/bin";
};
variables = {
# Conform more programs to XDG conventions. The rest are handled by their
# respective modules.
ASPELL_CONF = ''
per-conf $XDG_CONFIG_HOME/aspell/aspell.conf;
personal $XDG_CONFIG_HOME/aspell/en_US.pws;
repl $XDG_CONFIG_HOME/aspell/en.prepl;
'';
LESSHISTFILE = "$XDG_CACHE_HOME/lesshst";
WGETRC = "$XDG_CONFIG_HOME/wgetrc";
};
};
}