Move environment variables into separate files per program/language
This commit is contained in:
parent
6d287ef6d0
commit
c9b5475e41
1
env/10_path.zsh
vendored
Normal file
1
env/10_path.zsh
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
export PATH="$PATH:$HOME/.local/bin"
|
3
env/40_mail.zsh
vendored
Normal file
3
env/40_mail.zsh
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
export MAILDIR=$HOME/.maildir
|
||||||
|
export NOTMUCH_CONFIG=$XDG_CONFIG_HOME/notmuch-config
|
||||||
|
export GNUPGHOME="$XDG_CONFIG_HOME"/gnupg
|
3
env/50_nodejs.zsh
vendored
Normal file
3
env/50_nodejs.zsh
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
export NPM_PACKAGES="${XDG_DATA_HOME}/npm-packages"
|
||||||
|
export NODE_PATH="$NPM_PACKAGES/lib/node_modules:$NODE_PATH"
|
||||||
|
export PATH="$PATH:$NPM_PACKAGES/bin"
|
2
env/50_ruby.zsh
vendored
Normal file
2
env/50_ruby.zsh
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
RUBY_VERSION=${$(gem environment gemdir):t}
|
||||||
|
export PATH="$PATH:$HOME/.gem/ruby/$RUBY_VERSION/bin"
|
3
env/50_rust.zsh
vendored
Normal file
3
env/50_rust.zsh
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
if which rustup &>/dev/null; then
|
||||||
|
export RUST_SRC_PATH=$(rustup run stable rustc --print sysroot)/lib/rustlib/src/rust/src
|
||||||
|
fi
|
1
env/60_fzf.zsh
vendored
Normal file
1
env/60_fzf.zsh
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
export FZF_DEFAULT_COMMAND="fd"
|
29
env_template
29
env_template
|
@ -1,29 +0,0 @@
|
||||||
# path to your zsh configuration dir
|
|
||||||
# this may be the path to this repo, if you use it per user
|
|
||||||
# if you installed this repo to /etc/zsh/, this is the path for the per user
|
|
||||||
# config, which can override global settings in /etc/zsh
|
|
||||||
export ZDOTDIR=$HOME/.config/zsh
|
|
||||||
|
|
||||||
PROMPT_UNICODE=yes
|
|
||||||
|
|
||||||
# below you can put user or server specific settings.
|
|
||||||
|
|
||||||
# on foreign server I don't want to accidentaly alarm admins
|
|
||||||
#sudo() {
|
|
||||||
# echo "no root here";
|
|
||||||
#}
|
|
||||||
#
|
|
||||||
#su() {
|
|
||||||
# echo "no root here";
|
|
||||||
#}
|
|
||||||
|
|
||||||
# set modules to load. here: exclude highlight, because it is no fun over slow
|
|
||||||
# connections
|
|
||||||
#ZMODLOAD_ONLY=( autoloader bindings completion vcs prompt )
|
|
||||||
|
|
||||||
|
|
||||||
# make some programs use xdg basedirs
|
|
||||||
#export MAILDIR=$HOME/.maildir export NOTMUCH_CONFIG=$HOME/.config/notmuch-config
|
|
||||||
#export VIMINIT="let \$MYVIMRC=\"$XDG_CONFIG_HOME/vim/vimrc\" | source \$MYVIMRC"
|
|
||||||
#export GVIMINIT="let \$MYGVIMRC=\"$XDG_CONFIG_HOME/vim/gvimrc\" | source \$MYGVIMRC"
|
|
||||||
#export GNUPGHOME="$XDG_CONFIG_HOME"/gnupg
|
|
24
zshenv
24
zshenv
|
@ -1,24 +1,8 @@
|
||||||
export ZDOTDIR=$HOME/.config/zsh
|
export ZDOTDIR=${XDG_CONFIG_HOME:-$HOME/.config}/zsh
|
||||||
|
|
||||||
ZMODLOAD_BLACKLIST=( ssh-agent )
|
for i in $ZDOTDIR/env/*.zsh; do
|
||||||
export ZMODLOAD_BLACKLIST
|
. $i
|
||||||
if [ -n "$TMUX" ]; then export SHELL=/usr/bin/tmux; fi
|
done
|
||||||
|
|
||||||
export MAILDIR=$HOME/.maildir export NOTMUCH_CONFIG=$HOME/.config/notmuch-config
|
|
||||||
export GNUPGHOME="$XDG_CONFIG_HOME"/gnupg
|
|
||||||
export FZF_DEFAULT_COMMAND="fd"
|
|
||||||
export NPM_PACKAGES="${XDG_DATA_HOME}/npm-packages"
|
|
||||||
export NODE_PATH="$NPM_PACKAGES/lib/node_modules:$NODE_PATH"
|
|
||||||
|
|
||||||
PATH="$PATH:$HOME/.gem/ruby/2.5.0/bin"
|
|
||||||
PATH="$PATH:$NPM_PACKAGES/bin"
|
|
||||||
PATH="$PATH:$HOME/.local/bin"
|
|
||||||
PATH="$PATH:$XDG_DATA_HOME/android/sdk/tools"
|
|
||||||
export PATH
|
|
||||||
|
|
||||||
if command -v rustup &>/dev/null; then
|
|
||||||
export RUST_SRC_PATH=$(rustup run stable rustc --print sysroot)/lib/rustlib/src/rust/src
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -e $ZDOTDIR/dirs ]]; then
|
if [[ -e $ZDOTDIR/dirs ]]; then
|
||||||
source $ZDOTDIR/dirs
|
source $ZDOTDIR/dirs
|
||||||
|
|
Loading…
Reference in a new issue