Better nix support.

This commit is contained in:
Gabriel Ebner 2015-05-27 18:56:03 +02:00
parent 5611797936
commit d4d212517d
3 changed files with 50 additions and 48 deletions

@ -3,51 +3,7 @@
export USER=`whoami`
# $MYPREFIX {{{1
add_to() {
if [ -n "`eval echo \$\{$1\}`" ]; then
export $1="$2:`eval echo \$\{$1\}`"
else
export $1="$2"
fi
}
add_myprefix_to() {
add_to "$1" "$MYPREFIX/$2"
}
export MYPREFIX=$HOME/.local
add_to PATH ~/.cabal/bin
add_myprefix_to LD_LIBRARY_PATH lib
add_to MANPATH :
add_myprefix_to MANPATH share/man
add_myprefix_to PKG_CONFIG_PATH lib/pkgconfig
add_myprefix_to PATH bin
add_myprefix_to PATH sbin
if [ -x /usr/bin/perl ]; then
PERLVERSION="`perl -e 'printf"%vd\n",$^V'`"
add_myprefix_to PERL5LIB lib/perl/$PERLVERSION
add_myprefix_to PERL5LIB share/perl/$PERLVERSION
fi
add_myprefix_to R_LIBS lib/R:/usr/lib/R/site-library
if [ -d ~/build/android-sdk-linux ]; then
export ANDROID_HOME=$HOME/build/android-sdk-linux
add_to PATH $ANDROID_HOME/platform-tools:$ANDROID_HOME/tools
export ANDROID_SDK=$ANDROID_HOME ANDROID_NDK=$HOME/build/android-ndk-r9c
fi
add_to PATH ~/.babel/bin # nimrod package manager
add_to PATH ~/.gem/ruby/2.1.0/bin
# . $HOME/etc/nonnixshellrc
# Customisation of Programs {{{1
alias ls='ls --color=auto'
@ -59,8 +15,6 @@ export MPD_HOST=127.0.0.1 MPD_PORT=6600
alias vi=vim
test -f $HOME/.nix-profile/etc/profile.d/nix.sh && . $HOME/.nix-profile/etc/profile.d/nix.sh
# passc
passc() {
pass show "$1" | (read i; cat; echo -n "$i" | xclip -l 1 -se c)

48
nonnixshellrc Normal file

@ -0,0 +1,48 @@
# Copyright (C) 2011 Gabriel Ebner
# vim:fdm=marker ft=sh:
# $MYPREFIX {{{1
add_to() {
if [ -n "`eval echo \$\{$1\}`" ]; then
export $1="$2:`eval echo \$\{$1\}`"
else
export $1="$2"
fi
}
add_myprefix_to() {
add_to "$1" "$MYPREFIX/$2"
}
export MYPREFIX=$HOME/.local
add_to PATH ~/.cabal/bin
add_myprefix_to LD_LIBRARY_PATH lib
add_to MANPATH :
add_myprefix_to MANPATH share/man
add_myprefix_to PKG_CONFIG_PATH lib/pkgconfig
add_myprefix_to PATH bin
add_myprefix_to PATH sbin
if [ -x /usr/bin/perl ]; then
PERLVERSION="`perl -e 'printf"%vd\n",$^V'`"
add_myprefix_to PERL5LIB lib/perl/$PERLVERSION
add_myprefix_to PERL5LIB share/perl/$PERLVERSION
fi
add_myprefix_to R_LIBS lib/R:/usr/lib/R/site-library
if [ -d ~/build/android-sdk-linux ]; then
export ANDROID_HOME=$HOME/build/android-sdk-linux
add_to PATH $ANDROID_HOME/platform-tools:$ANDROID_HOME/tools
export ANDROID_SDK=$ANDROID_HOME ANDROID_NDK=$HOME/build/android-ndk-r9c
fi
add_to PATH ~/.babel/bin # nimrod package manager
add_to PATH ~/.gem/ruby/2.1.0/bin

2
zshrc

@ -32,4 +32,4 @@ SAVEHIST=100000
HISTFILE=~/.zhist
# OPAM configuration
. ~/.opam/opam-init/init.zsh > /dev/null 2> /dev/null || true
# . ~/.opam/opam-init/init.zsh > /dev/null 2> /dev/null || true