From c261326353678be1828ddbbb30e5137a5380bc5e Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Wed, 12 Jun 2024 07:17:05 -0500 Subject: [PATCH] refactor(nix/hm/price): better handle setting var for `z.lua` --- users/price/dots/.config/zsh/config/plugins/init.zsh | 3 +-- users/price/home.nix | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/users/price/dots/.config/zsh/config/plugins/init.zsh b/users/price/dots/.config/zsh/config/plugins/init.zsh index 3d773f3e..7d53754a 100644 --- a/users/price/dots/.config/zsh/config/plugins/init.zsh +++ b/users/price/dots/.config/zsh/config/plugins/init.zsh @@ -17,8 +17,7 @@ init() { FPATH="${FPATH}:${wkdir}/nix-zsh-completions" - export _ZL_DATA="${XDG_CACHE_HOME}/zlua" - touch "${_ZL_DATA}" + export _ZL_DATA="${_ZL_DATA:-"$XDG_CACHE_HOME/zlua"}" eval "$(lua "${wkdir}/z.lua/z.lua" --init zsh enhanced once)" [[ -r "${XDG_CONFIG_HOME}/fzf/fzf.zsh" ]] && source "${XDG_CONFIG_HOME}/fzf/fzf.zsh" diff --git a/users/price/home.nix b/users/price/home.nix index bdefd2b6..637a3cf4 100644 --- a/users/price/home.nix +++ b/users/price/home.nix @@ -148,6 +148,7 @@ in } // softLinkDots ".config"; sessionVariables = { + _ZL_DATA = "${config.xdg.cacheHome}/zlua"; RUSTUP_HOME = "${config.xdg.dataHome}/rustup"; CARGO_HOME = "${config.xdg.dataHome}/cargo"; OMNISHARPHOME = "${config.xdg.configHome}/omnisharp";