Added basic xdg support
This commit is contained in:
parent
2fd781022f
commit
fd220567df
|
@ -6,6 +6,7 @@ let
|
||||||
sha256 = "sha256-Btjo+v/xA26CwwFauNmSdJOauIq/yZoBV1Com39nu6E=";
|
sha256 = "sha256-Btjo+v/xA26CwwFauNmSdJOauIq/yZoBV1Com39nu6E=";
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
|
imports = [ ../system/xdg.nix ];
|
||||||
# Allow Cleanup, nix, & flakes
|
# Allow Cleanup, nix, & flakes
|
||||||
nix = {
|
nix = {
|
||||||
autoOptimiseStore = true;
|
autoOptimiseStore = true;
|
||||||
|
|
34
modules/system/xdg.nix
Normal file
34
modules/system/xdg.nix
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
# 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";
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
Reference in New Issue
Block a user