Skip to content

Commit

Permalink
xdg-settings: Another sweep through disrespectful applications
Browse files Browse the repository at this point in the history
  • Loading branch information
TLATER committed May 5, 2021
1 parent c4e56b0 commit 50f76c6
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
4 changes: 0 additions & 4 deletions dotfiles/env
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ export EDITOR='emacsclient'
export ALTERNATE_EDITOR='emacs'
export VTERM='alacritty'

# Make a handful of applications follow XDG_BASE_DIRS
export CARGO_HOME="$XDG_CACHE_HOME/cargo"
export RUSTUP_HOME="$XDG_DATA_HOME/rustup"

# Set up password store properly
export PASSWORD_STORE_DIR="$XDG_DATA_HOME/password-store"
export PASSWORD_STORE_KEY="0x9FAF1AA48509A7F1"
Expand Down
5 changes: 4 additions & 1 deletion nixpkgs/configurations/tty-programs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
xdg.configFile."screen/config".source = "${dotroot}/dotfiles/screenrc";

programs = {
ncmpcpp.enable = true;
ncmpcpp = {
enable = true;
settings.ncmpcpp_directory = "${config.xdg.dataHome}";
};
git = {
enable = true;
userName = "Tristan Daniël Maat";
Expand Down
21 changes: 21 additions & 0 deletions nixpkgs/configurations/xdg-settings.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,28 @@ in {
LESSKEY = "${xdg.cacheHome}/less/key";
LESSHISTFILE = "${xdg.cacheHome}/less/history";
PYLINTHOME = "${xdg.cacheHome}/pylint";
CARGO_HOME = "${xdg.cacheHome}/cargo";
RUSTUP_HOME = "${xdg.dataHome}/rustup";
XCOMPOSECACHE = "${xdg.cacheHome}/X11/xcompose";
NPM_CONFIG_USERCONFIG = "${xdg.configHome}/npm/npmrc";

# See, this is exactly why things should follow the spec. I have
# no intention of using gradle ever, but occasionally I need to
# build software that uses it.
#
# Now I need to deal with gradle puking directories all over my
# file system, or have a permanent configuration option here for
# software I don't even use.
#
# Grmbl.
GRADLE_USER_HOME = "${xdg.cacheHome}/gradle";
};

# More hacks to avoid stupid package managers puking all over my
# $HOME, for this one I even need a permanent file in ~/.config!
xdg.configFile."npm/npmrc".text = ''
prefix=${xdg.cacheHome}/npm
cache=${xdg.cacheHome}/npm
tmp=$XDG_RUNTIME_DIR/npm
'';
}

0 comments on commit 50f76c6

Please sign in to comment.