35 lines
1.1 KiB
Nix
35 lines
1.1 KiB
Nix
|
# This was cribed from Hlisser's dotfiles see here
|
||
|
# https://github.com/hlissner/dotfiles/blob/8fe1fbb6e7fc0d2f95fe75cdb9df7eb0595a0047/modules/xdg.nix
|
||
|
#
|
||
|
{ config, pkgs, ... }: {
|
||
|
|
||
|
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";
|
||
|
};
|
||
|
|
||
|
};
|
||
|
}
|