2007-01-15 14:43:56 +00:00
|
|
|
export PATH=@wrapperDir@:@systemPath@/bin:@systemPath@/sbin
|
|
|
|
export MODULE_DIR=@kernel@/lib/modules
|
|
|
|
export NIX_CONF_DIR=/nix/etc/nix
|
|
|
|
export PAGER=less
|
2007-01-17 12:33:23 +00:00
|
|
|
export TZ=@timeZone@
|
2007-01-17 17:44:57 +00:00
|
|
|
export FONTCONFIG_FILE=/etc/fonts/fonts.conf
|
2007-01-15 14:43:56 +00:00
|
|
|
|
|
|
|
PROMPT_COLOR="1;31m"
|
|
|
|
PS1="\n\[\033[$PROMPT_COLOR\][\u@\h:\w]$\[\033[0m\] "
|
|
|
|
if test "x$TERM" == "xxterm"; then
|
|
|
|
PS1="\033]2;\h:\u:\w\007\033]1;$PS1"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$USER" != root; then
|
|
|
|
export NIX_REMOTE=daemon
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# Set up the per-user profile.
|
|
|
|
NIX_USER_PROFILE_DIR=/nix/var/nix/profiles/per-user/$USER
|
|
|
|
mkdir -m 0755 -p $NIX_USER_PROFILE_DIR
|
2007-01-16 13:30:59 +00:00
|
|
|
if test "$(stat --printf '%u' $NIX_USER_PROFILE_DIR)" != "$(id -u)"; then
|
|
|
|
echo "WARNING: bad ownership on $NIX_USER_PROFILE_DIR" >&2
|
2007-01-15 14:43:56 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if ! test -L $HOME/.nix-profile; then
|
|
|
|
echo "creating $HOME/.nix-profile" >&2
|
|
|
|
ln -s $NIX_USER_PROFILE_DIR/profile $HOME/.nix-profile
|
|
|
|
fi
|
|
|
|
|
|
|
|
NIX_PROFILES="/nix/var/nix/profiles/default $NIX_USER_PROFILE_DIR/profile"
|
|
|
|
|
|
|
|
for i in $NIX_PROFILES; do # !!! reverse
|
2007-02-12 15:29:43 +00:00
|
|
|
export PATH=$i/bin:$i/sbin:$PATH
|
2007-01-15 14:43:56 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
# Set up a default Nix expression from which to install stuff.
|
|
|
|
if ! test -L $HOME/.nix-defexpr; then
|
|
|
|
echo "creating $HOME/.nix-defexpr" >&2
|
|
|
|
ln -s /etc/nixos/install-source.nix $HOME/.nix-defexpr
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# Some aliases.
|
|
|
|
alias ls="ls --color=tty"
|
|
|
|
alias ll="ls -l"
|
|
|
|
alias which="type -p"
|
|
|
|
|
|
|
|
|
|
|
|
# Read system-wide modifications.
|
|
|
|
if test -f /etc/profile.local; then
|
|
|
|
source /etc/profile.local
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# Read user modifications.
|
|
|
|
test -r $HOME/.bashrc && source $HOME/.bashrc
|