nixos-framework-laptop-config/home/xdg.nix
2024-12-28 19:33:49 -05:00

31 lines
706 B
Nix

{
config,
lib,
pkgs,
...
}: let
inherit (config.xdg) stateHome dataHome configHome cacheHome;
variables = {
# Bash (.bash_history)
HISTFILE = "${stateHome}/bash/history";
# Rust (.cargo)
CARGO_HOME = "${dataHome}/cargo";
RUSTUP_HOME = "${dataHome}/rustup";
# GTK2 (.gtkrc-2.0)
GTK2_RC_FILES = "${configHome}/gtk-2.0/gtkrc";
# XCompose (.compose-cache)
XCOMPOSECACHE = "${cacheHome}/X11/xcompose";
# NuGet (.nuget/packages)
NUGET_PACKAGES = "${dataHome}/NuGetPackages";
};
in {
home.sessionVariables = variables;
systemd.user.sessionVariables = variables;
# Run `xdg-ninja` to check fixable dotfiles
home.packages = [pkgs.xdg-ninja];
}