nix-configs/home-modules/xdg.nix

30 lines
1.1 KiB
Nix
Raw Normal View History

2024-09-21 20:07:40 -04:00
{
config,
lib,
osConfig,
...
}:
{
home.preferXdgDirectories = true;
xdg.enable = true;
home.sessionVariables = {
ANDROID_USER_HOME = "${config.xdg.dataHome}/android";
CARGO_HOME = "${config.xdg.dataHome}/cargo";
DOTNET_CLI_HOME = "${config.xdg.dataHome}/dotnet";
DVDCSS_CACHE = "${config.xdg.dataHome}/dvdcss";
GRADLE_USER_HOME = "${config.xdg.dataHome}/gradle";
JAVA_OPTIONS = "-Djava.util.prefs.userRoot=${config.xdg.configHome}/java";
NODE_REPL_HISTORY = "${config.xdg.stateHome}/node_repl_history";
NPM_CONFIG_USERCONFIG = "${config.xdg.configHome}/npm/npmrc";
PYTHON_HISTORY = "${config.xdg.stateHome}/python_history";
RUSTUP_HOME = "${config.xdg.dataHome}/rustup";
XCOMPOSE_CACHE = "${config.xdg.cacheHome}/X11/xcompose";
};
home.shellAliases = {
adb = ''HOME="${config.xdg.dataHome}/android" adb'';
mvn = "mvn -gs ${config.xdg.configHome}/maven/settings.xml";
wget = "wget --hsts-file=${config.xdg.dataHome}/wget-hsts";
};
2024-09-21 20:30:34 -04:00
gtk.gtk2.configLocation = lib.mkIf osConfig.services.displayManager.enable "${config.xdg.configHome}/gtk-2.0/gtkrc";
2024-09-21 20:07:40 -04:00
}