ENH move env stuff from pam to zshenv

This commit is contained in:
Nathan Dwarshuis 2022-11-01 23:44:11 -04:00
parent 42a9bd9984
commit 7d29eaabe1
2 changed files with 144 additions and 141 deletions

View File

@ -1,141 +0,0 @@
# path (include ~/.bin and ~/.local/bin)
PATH OVERRIDE={{ .chezmoi.homeDir }}/.bin:{{ .chezmoi.homeDir }}/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin
# default directories
XDG_CONFIG_HOME DEFAULT={{ .paths.config }}
XDG_CACHE_HOME DEFAULT={{ .paths.cache }}
XDG_DATA_HOME DEFAULT={{ .paths.data }}
XDG_RUNTIME_DIR DEFAULT={{ .paths.runtime }}
# super common tools
PAGER DEFAULT=less
INPUTRC DEFAULT=${XDG_CONFIG_HOME}/readline/inputrc
LESSKEY DEFAULT=${XDG_CONFIG_HOME}/less/lesskey
LESSHISTFILE DEFAULT=-
GNUPGHOME DEFAULT=${XDG_CONFIG_HOME}/gnupg
EDITOR DEFAULT=vim
# AWS (all will suffer...)
AWS_SHARED_CREDENTIALS_FILE DEFAULT=${XDG_CONFIG_HOME}/aws/credentials
AWS_CONFIG_FILE DEFAULT=${XDG_CONFIG_HOME}/aws/config
# cache compiled bits; highly recommended for makepkg
CCACHE_CONFIGPATH DEFAULT=${XDG_CONFIG_HOME}/ccache.config
CCACHE_DIR DEFAULT=${XDG_CACHE_HOME}/ccache
# REPL stuff
NODE_REPL_HISTORY DEFAULT=${XDG_DATA_HOME}/npm/node_repl.log
PYTHONSTARTUP DEFAULT=${XDG_CONFIG_HOME}/python/startup.py
# shell stuff
HISTFILE DEFAULT=${XDG_DATA_HOME}/zsh_history.log
HISTSIZE DEFAULT=1000000
SAVEHIST DEFAULT=1000000
ZDOTDIR DEFAULT=${XDG_CONFIG_HOME}/zsh
# X11 forwarding (required even without a full X11 server)
ICEAUTHORITY DEFAULT=${XDG_CACHE_DIR}/ICEauthority
XAUTHORITY DEFAULT=${XDG_RUNTIME_DIR}/Xauthority
{{ if .features.ansible -}}
# ansible
ANSIBLE_VAULT_PASSWORD_FILE DEFAULT=@{HOME}/.bin/ansible-vault-pass-client
ANSIBLE_VAULT_IDENTITY DEFAULT=ansible/vault
{{- end }}
{{ if .development.emacs -}}
# emacs
MU_HOME DEFAULT=${XDG_CACHE_HOME}/mu
MAILDIR DEFAULT=/mnt/data/Mail
ASPELL_CONF DEFAULT="per-conf ${XDG_CONFIG_HOME}/aspell/aspell.conf; personal ${XDG_CONFIG_HOME}/aspell/en.pws; repl ${XDG_CONFIG_HOME}/aspell/en.prepl"
{{- end }}
{{ if .development.ruby -}}
# ruby development
RBENV_ROOT DEFAULT=${XDG_DATA_HOME}/rbenv
BUNDLE_USER_CONFIG DEFAULT=${XDG_CONFIG_HOME}/bundle
BUNDLE_USER_CACHE DEFAULT=${XDG_CACHE_HOME}/bundle
BUNDLE_USER_PLUGIN DEFAULT=${XDG_DATA_HOME}/bundle
GEM_HOME DEFAULT=${XDG_DATA_HOME}/gem
GEM_SPEC_CACHE DEFAULT=${XDG_CACHE_HOME}/gem
{{- end }}
{{ if .development.rust -}}
# rust development
CARGO_HOME DEFAULT=${XDG_DATA_HOME}/cargo
{{- end }}
{{ if .development.clojure -}}
# clojure development
LEIN_HOME DEFAULT=${XDG_DATA_HOME}/lein
{{- end }}
{{ if .development.matlab -}}
# matlab development (if I must...)
MATLAB_PREFDIR DEFAULT=${XDG_CONFIG_HOME}/matlab
MATLAB_LOG_DIR DEFAULT=${XDG_DATA_HOME}/matlab/log
# required for matlab's silly GUI to work with xmonad
_JAVA_AWT_WM_NONREPARENTING DEFAULT=1
{{- end }}
{{ if .development.r -}}
# R development
R_ENVIRON_USER DEFAULT=${XDG_CONFIG_HOME}/r/Renviron
{{- end }}
{{ if .development.latex -}}
# LaTeX writing...I mean...development
TEXMFHOME DEFAULT=${XDG_CONFIG_HOME}/texmf
{{- end }}
{{ if .development.github -}}
# Github development (for READMEs)
GRIPHOME DEFAULT=${XDG_CONFIG_HOME}/grip
{{- end }}
{{ if .development.conda -}}
# conda development
CONDARC DEFAULT=${XDG_CONFIG_HOME}/conda/condarc
{{- end }}
{{ if .development.python -}}
# python development
IPYTHONDIR DEFAULT=${XDG_CONFIG_HOME}/ipython
PYLINTHOME DEFAULT=${XDG_CACHE_HOME}/pylint
PYENV_ROOT DEFAULT=${XDG_DATA_HOME}/pyenv
{{- end }}
{{ if .features.seafile -}}
# seafile
CCNET_CONF_DIR DEFAULT=${XDG_CONFIG_HOME}/ccnet
{{- end }}
{{ if .desktop -}}
# gnucash
AQBANKING_HOME DEFAULT=${XDG_CONFIG_HOME}/aqbanking
# gtk2
GTK2_RC_FILES DEFAULT=${XDG_CONFIG_HOME}/gtk-2.0/gtkrc
# xft fonts
GDK_USE_XFT DEFAULT=1
QT_XFT DEFAULT=true
# QT (which should look like gtk)
QT_QPA_PLATFORMTHEME DEFAULT=qt5ct
# libreoffice?
SAL_USE_VCLPLUGIN DEFAULT=gtk
# store passwords in gnupg directory (which is then encrypted)
PASSWORD_STORE_DIR DEFAULT=${GNUPGHOME}/pass
# X11
XINITRC DEFAULT=${XDG_CONFIG_HOME}/X11/xinitrc
# xmonad (and haskell)
STACK_ROOT DEFAULT=${XDG_DATA_HOME}/stack
XMONAD_CACHE_DIR DEFAULT=${XDG_CACHE_HOME}/xmonad
XMONAD_CONFIG_DIR DEFAULT=${XDG_CONFIG_HOME}/xmonad
XMONAD_DATA_DIR DEFAULT=${XDG_DATA_HOME}/xmonad
{{- end }}

144
dot_zshenv.tmpl Normal file
View File

@ -0,0 +1,144 @@
# path (include ~/.bin and ~/.local/bin)
export PATH={{ .chezmoi.homeDir }}/.bin:{{ .chezmoi.homeDir }}/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin
# default directories
export XDG_CONFIG_HOME={{ .paths.config }}
export XDG_CACHE_HOME={{ .paths.cache }}
export XDG_DATA_HOME={{ .paths.data }}
export XDG_RUNTIME_DIR={{ .paths.runtime }}
# super common tools
export PAGER=less
export INPUTRC=$XDG_CONFIG_HOME/readline/inputrc
export LESSKEY=$XDG_CONFIG_HOME/less/lesskey
export LESSHISTFILE=-
export GNUPGHOME=$XDG_CONFIG_HOME/gnupg
export EDITOR=vim
# AWS (all will suffer...)
export AWS_SHARED_CREDENTIALS_FILE=$XDG_CONFIG_HOME/aws/credentials
export AWS_CONFIG_FILE=$XDG_CONFIG_HOME/aws/config
# cache compiled bits; highly recommended for makepkg
export CCACHE_CONFIGPATH=$XDG_CONFIG_HOME/ccache.config
export CCACHE_DIR=$XDG_CACHE_HOME/ccache
# REPL stuff
export NODE_REPL_HISTORY=$XDG_DATA_HOME/npm/node_repl.log
export PYTHONSTARTUP=$XDG_CONFIG_HOME/python/startup.py
# shell stuff
export HISTFILE=$XDG_DATA_HOME/zsh_history.log
export HISTSIZE=1000000
export SAVEHIST=1000000
export ZDOTDIR=$XDG_CONFIG_HOME/zsh
# X11 forwarding (required even without a full X11 server)
export ICEAUTHORITY=$XDG_CACHE_HOME/ICEauthority
export XAUTHORITY=$XDG_RUNTIME_DIR/Xauthority
# suppress AT-SPI stuff
export NO_AT_BRIDGE=1
{{ if .features.ansible -}}
# ansible
export ANSIBLE_VAULT_PASSWORD_FILE=$HOME/.bin/ansible-vault-pass-client
export ANSIBLE_VAULT_IDENTITY=ansible/vault
{{- end }}
{{ if .development.emacs -}}
# emacs
export MU_HOME=$XDG_CACHE_HOME/mu
export MAILDIR=/mnt/data/Mail
export ASPELL_CONF="per-conf $XDG_CONFIG_HOME/aspell/aspell.conf; personal $XDG_CONFIG_HOME/aspell/en.pws; repl $XDG_CONFIG_HOME/aspell/en.prepl"
{{- end }}
{{ if .development.ruby -}}
# ruby development
export RBENV_ROOT=$XDG_DATA_HOME/rbenv
export BUNDLE_USER_CONFIG=$XDG_CONFIG_HOME/bundle
export BUNDLE_USER_CACHE=$XDG_CACHE_HOME/bundle
export BUNDLE_USER_PLUGIN=$XDG_DATA_HOME/bundle
export GEM_HOME=$XDG_DATA_HOME/gem
export GEM_SPEC_CACHE=$XDG_CACHE_HOME/gem
{{- end }}
{{ if .development.rust -}}
# rust development
export CARGO_HOME=$XDG_DATA_HOME/cargo
{{- end }}
{{ if .development.clojure -}}
# clojure development
export LEIN_HOME=$XDG_DATA_HOME/lein
{{- end }}
{{ if .development.matlab -}}
# matlab development (if I must...)
export MATLAB_PREFDIR=$XDG_CONFIG_HOME/matlab
export MATLAB_LOG_DIR=$XDG_DATA_HOME/matlab/log
# required for matlab's silly GUI to work with xmonad
export _JAVA_AWT_WM_NONREPARENTING=1
{{- end }}
{{ if .development.r -}}
# R development
export R_ENVIRON_USER=$XDG_CONFIG_HOME/r/Renviron
{{- end }}
{{ if .development.latex -}}
# LaTeX writing...I mean...development
export TEXMFHOME=$XDG_CONFIG_HOME/texmf
{{- end }}
{{ if .development.github -}}
# Github development (for READMEs)
export GRIPHOME=$XDG_CONFIG_HOME/grip
{{- end }}
{{ if .development.conda -}}
# conda development
export CONDARC=$XDG_CONFIG_HOME/conda/condarc
{{- end }}
{{ if .development.python -}}
# python development
export IPYTHONDIR=$XDG_CONFIG_HOME/ipython
export PYLINTHOME=$XDG_CACHE_HOME/pylint
export PYENV_ROOT=$XDG_DATA_HOME/pyenv
{{- end }}
{{ if .features.seafile -}}
# seafile
export CCNET_CONF_DIR=$XDG_CONFIG_HOME/ccnet
{{- end }}
{{ if .desktop -}}
# gnucash
export AQBANKING_HOME=$XDG_CONFIG_HOME/aqbanking
# gtk2
export GTK2_RC_FILES=$XDG_CONFIG_HOME/gtk-2.0/gtkrc
# xft fonts
export GDK_USE_XFT=1
export QT_XFT=true
# QT (which should look like gtk)
export QT_QPA_PLATFORMTHEME=qt5ct
# libreoffice?
export SAL_USE_VCLPLUGIN=gtk
# store passwords in gnupg directory (which is then encrypted)
export PASSWORD_STORE_DIR=$GNUPGHOME/pass
# X11
export XINITRC=$XDG_CONFIG_HOME/X11/xinitrc
# xmonad (and haskell)
export STACK_ROOT=$XDG_DATA_HOME/stack
export XMONAD_CACHE_DIR=$XDG_CACHE_HOME/xmonad
export XMONAD_CONFIG_DIR=$XDG_CONFIG_HOME/xmonad
export XMONAD_DATA_DIR=$XDG_DATA_HOME/xmonad
{{- end }}