2 # Global environment file. Sources at shell start and X start
3 # Keep it simple and POSIX
5 # Don't really need to source this at X start. I get double definitions.
6 # Have yet to discover a good solution.
9 [ -d "${HOME}/.guix-profile" ] && GUIX_PROFILE="${HOME}/.guix-profile"
11 # We have the system stuff, which should be set by the time we get here.
12 # Arrange source $GUIX_PROFILE/etc/profile if on a foreign distro.
13 # A Guix system will already have arranged this.
14 if [ -f ${GUIX_PROFILE}/etc/profile ]; then
15 echo $PATH | grep guix-profile >/dev/null 2>&1 || . ${GUIX_PROFILE}/etc/profile
17 [ -x ${HOME}/.config/guix/current/bin/guix ] && PATH=${HOME}/.config/guix/current/bin${PATH:+:}${PATH}
18 # XDG_DATA_DIRS is not defined for icecat on foreign distros.
19 if [ -z "${XDG_DATA_DIRS}" ]; then
20 # if /usr/share isn't present, stumpwm fails to start.
21 export XDG_DATA_DIRS=${GUIX_PROFILE}/share:/usr/share
23 echo ${XDG_DATA_DIRS} | grep ${GUIX_PROFILE} > /dev/null 2>&1 || export XDG_DATA_DIRS=${GUIX_PROFILE}/share/${XDG_DATA_DIRS:+:}${XDG_DATA_DIRS}
26 # set GUIX_LOCPATH for GUIX libc
27 [ -x $HOME/.guix-profile/lib/locale ] && export GUIX_LOCPATH=$HOME/.guix-profile/lib/locale${GUIX_LOCPATH:+:}$GUIX_LOCPATH
31 # No matter my LANG, I want sane unix-style sorting.
34 # And good old ls -l dates
39 # All our Guix related variables should be defined.
41 # Now the stupid stuff for AIX systems.
42 # If there is an /opt/freeware/[s]bin/ add to front of path now.
43 [ -x /opt/freeware/sbin ] && PATH=/opt/freeware/sbin${PATH:+:}$PATH
44 [ -x /opt/freeware/bin ] && PATH=/opt/freeware/bin${PATH:+:}$PATH
46 [ -x /usr/vacpp/bin ] && PATH=/usr/vacpp/bin${PATH:+:}$PATH
47 [ -x /usr/vac/bin ] && PATH=/usr/vac/bin${PATH:+:}$PATH
49 # $HOME/.stage is stuff I'm currently building to push out to AIX.
50 # $HOME/.private is stuff for AIX or other systems where I can't install
51 # $HOME/.private was $HOME/.local but apparently XDG or someother "standards"
52 # has used the name. *sigh*
53 # In theory as I install guix $HOME/.private will shrink.
54 # I *usually* want private in front of stage
55 # $HOME/.aix is where I install AIX crap I need to keep my sanity.
57 [ -x $HOME/.stage/sbin ] && PATH=$HOME/.stage/sbin${PATH:+:}$PATH
58 [ -x $HOME/.stage/bin ] && PATH=$HOME/.stage/bin${PATH:+:}$PATH
59 [ -x $HOME/.private/sbin ] && PATH=$HOME/.private/sbin${PATH:+:}$PATH
60 [ -x $HOME/.private/bin ] && PATH=$HOME/.private/bin${PATH:+:}$PATH
61 [ -x $HOME/.aix/sbin ] && PATH=$HOME/.aix/sbin${PATH:+:}$PATH
62 [ -x $HOME/.aix/bin ] && PATH=$HOME/.aix/bin${PATH:+:}$PATH
64 # Let's put $HOME/bin in front of everything.
65 PATH=$HOME/bin${PATH:+:}$PATH
69 [ -d /usr/share/info ] && export INFOPATH="${INFOPATH}${INFOPATH:+:}/usr/share/info"
70 [ -x $HOME/.private/share/info ] && export INFOPATH=$HOME/.private/share/info${INFOPATH:+:}$INFOPATH
76 if type emacs >/dev/null 2>&1; then
77 EDITOR="emacsclient -a \"\""
78 ALTERNATE_EDITOR="emacs --daemon"
79 export ALTERNATE_EDITOR
80 elif type vim >/dev/null 2>&1; then
89 if [ -n "$TERM" ]; then
97 type less >/dev/null 2>&1
105 type lesspipe >/dev/null 2>&1
106 if [ $? -eq 0 ]; then
110 # Set COLORTERM for slang programs if this is a color terminal
111 if [ "$TERM" = "xterm" -o "$TERM" = "linux" ]; then
115 # Random environment settings.
121 [ -f $HOME/.email ] && EMAIL=$(cat $HOME/.email)
122 [ -z ${EMAIL} ] && EMAIL="j@mesrichardson.com"
126 NAME='James Richardson'
130 GIT_AUTHOR_NAME="$NAME"
131 export GIT_AUTHOR_NAME
132 #GIT_AUTHOR_EMAIL=$EMAIL
133 #export GIT_AUTHOR_EMAIL
134 GIT_COMMITTER_NAME="$NAME"
135 export GIT_COMMITTER_NAME
136 #GIT_COMMITTER_EMAIL=$EMAIL
137 #export GIT_COMMITTER_EMAIL
139 # use $HOME/tmp when possible, out of general paranoia.
140 # So many programs have /tmp symlink races...
151 # Clean vcs dirs when building packages.
152 DH_ALWAYS_EXCLUDE=CVS:.svn:.git
153 export DH_ALWAYS_EXCLUDE
155 # Use my own timezone EST
159 # rmv and python crap, will be replaced with guix, maybe.
161 [ -s "$HOME/.rvm/scripts/rvm" ] && . "$HOME/.rvm/scripts/rvm"
163 PYTHONPATH=$HOME/.python
166 # Let's set defaults for AIX (largely from Perlz's site)
167 # Caused more problems than not having in .environment
168 if [ X"AIX" = X"$(uname)" ]; then
169 export OBJECT_MODE=64
170 unset LD_LIBRARY_PATH
172 #export CONFIG_SHELL=/opt/freeware/bin/bash
173 #export CONFIG_ENV_ARGS=/opt/freeware/bin/bash
176 #export CFLAGS="-qmaxmem=16384 -DSYSV -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51 -D_AIX52 -D_AIX53 -D_AIX61 -D_AIX71 \
177 # -D_ALL_SOURCE -DFUNCPROTO=15 -O -I/opt/freeware/include"
179 #export CXXFLAGS=$CFLAGS
182 #export FFLAGS="-qmaxmem=16384 -O -I/opt/freeware/include"
185 # for 32-bit applications
186 #export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000"
187 # for 64-bit applications
188 #export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib \
189 # -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000"
191 # environment ends here