From 85847989e4f65329dd28ff31cf6027dbb296b36a Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 26 May 2015 14:54:26 -0400 Subject: bash: Add config for non-GuixSD systems. --- dotfiles/.bash_profile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dotfiles/.bash_profile b/dotfiles/.bash_profile index cb03ccf..836f648 100644 --- a/dotfiles/.bash_profile +++ b/dotfiles/.bash_profile @@ -1,5 +1,10 @@ # -*- shell-script -*- +# Test if this is a GuixSD system. +function guixsd() { + return `test -d /run/current-system` +} + # Honor per-interactive-shell startup file if [ -f ~/.bashrc ]; then . ~/.bashrc; fi @@ -8,3 +13,10 @@ export PATH="$HOME/.guix-profile/sbin:$PATH" # SSH agent. export SSH_AUTH_SOCK="$HOME/.gnupg/S.gpg-agent.ssh" + +# Extra configuration needed on non-GuixSD systems. +if ! guixsd +then + export PATH="$HOME/.guix-profile/bin:$PATH" + export LOCPATH="$HOME/.guix-profile/lib/locale" +fi -- cgit v1.2.3