Move zsh/zgen setup to .zshenv
This commit is contained in:
parent
ee84fa45a2
commit
d46b38c389
|
@ -1,3 +1,12 @@
|
||||||
|
export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
|
||||||
|
export ZSH_CACHE="$XDG_CACHE_HOME/zsh"
|
||||||
|
export ZGEN_DIR="$XDG_CACHE_HOME/zgen"
|
||||||
|
export ZGEN_SOURCE="$ZGEN_DIR/zgen.zsh"
|
||||||
|
|
||||||
|
if [[ ! -d "$ZGEN_SOURCE" ]]; then
|
||||||
|
git clone https://github.com/tarjoilija/zgen "$ZGEN_DIR"
|
||||||
|
fi
|
||||||
|
|
||||||
for dir in $XDG_CONFIG_HOME/*/bin(N); do
|
for dir in $XDG_CONFIG_HOME/*/bin(N); do
|
||||||
export PATH="$dir:$PATH"
|
export PATH="$dir:$PATH"
|
||||||
done
|
done
|
||||||
|
|
|
@ -1,16 +1,7 @@
|
||||||
{ config, pkgs, libs, ... }:
|
{ config, pkgs, libs, ... }:
|
||||||
|
|
||||||
let zgen = builtins.fetchGit "https://github.com/tarjoilija/zgen";
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
environment = {
|
environment = {
|
||||||
variables = {
|
|
||||||
ZDOTDIR = "$XDG_CONFIG_HOME/zsh";
|
|
||||||
ZSH_CACHE = "$XDG_CACHE_HOME/zsh";
|
|
||||||
ZGEN_DIR = "$XDG_CACHE_HOME/zgen";
|
|
||||||
ZGEN_SOURCE = "${zgen}/zgen.zsh";
|
|
||||||
};
|
|
||||||
|
|
||||||
systemPackages = with pkgs; [
|
systemPackages = with pkgs; [
|
||||||
zsh
|
zsh
|
||||||
nix-zsh-completions
|
nix-zsh-completions
|
||||||
|
@ -35,6 +26,9 @@ in
|
||||||
home-manager.users.hlissner.xdg.configFile = {
|
home-manager.users.hlissner.xdg.configFile = {
|
||||||
# link recursively so other modules can link files in this folder,
|
# link recursively so other modules can link files in this folder,
|
||||||
# particularly in zsh/rc.d/*.zsh
|
# particularly in zsh/rc.d/*.zsh
|
||||||
"zsh" = { source = <config/zsh>; recursive = true; };
|
"zsh" = {
|
||||||
|
source = <config/zsh>;
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue