added some xdg to macos

This commit is contained in:
Maddie H 2023-04-02 18:11:06 +01:00
parent 06bf35ff27
commit 4677d65add
Signed by: maddie
GPG Key ID: C296DE8C9053683F
2 changed files with 21 additions and 14 deletions

21
maddie/common/xdg.nix Normal file
View File

@ -0,0 +1,21 @@
{ config, ... }:
{
home = {
sessionVariables = {
# Force use of XDG Dir Spec
CUDA_CACHE_PATH = "${config.xdg.cacheHome}/nv";
LESSHISTFILE = "${config.xdg.configHome}/less/history";
LESSKEY = "${config.xdg.configHome}/less/keys";
WINEPREFIX = "${config.xdg.dataHome}/wine";
_JAVA_OPTIONS = "-Djava.util.prefs.userRoot=${config.xdg.configHome}/java";
};
shellAliases = {
# Force use of XDG Dir Spec
wget = "wget --hsts-file='${config.xdg.dataHome}/wget-hsts'";
rxrdb = "xrdb -load '${config.xdg.configHome}/.config/X11/xresources'";
nvidia-settings = "nvidia-settings --config='${config.xdg.configHome}'/nvidia/settings";
};
};
}

View File

@ -50,24 +50,10 @@
home = { home = {
sessionVariables = { sessionVariables = {
# Force use of XDG Dir Spec
CUDA_CACHE_PATH = "${config.xdg.cacheHome}/nv";
LESSHISTFILE = "${config.xdg.configHome}/less/history";
LESSKEY = "${config.xdg.configHome}/less/keys";
WINEPREFIX = "${config.xdg.dataHome}/wine";
_JAVA_OPTIONS = "-Djava.util.prefs.userRoot=${config.xdg.configHome}/java";
# Default programs # Default programs
EDITOR = "nvim"; EDITOR = "nvim";
TERMINAL = "st"; TERMINAL = "st";
BROWSER = "librewolf"; BROWSER = "librewolf";
}; };
shellAliases = {
# Force use of XDG Dir Spec
wget = "wget --hsts-file='${config.xdg.dataHome}/wget-hsts'";
rxrdb = "xrdb -load '${config.xdg.configHome}/.config/X11/xresources'";
nvidia-settings = "nvidia-settings --config='${config.xdg.configHome}'/nvidia/settings";
};
}; };
} }