From b98ebda7d17758c9930ef07e7af8f2daafb80295 Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Thu, 16 Sep 2021 21:53:50 +0200 Subject: [PATCH 1/2] [ZSH] Load GUIX profile only if its available --- shells/zshrc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/shells/zshrc b/shells/zshrc index 3c27e73..ffbc1f8 100644 --- a/shells/zshrc +++ b/shells/zshrc @@ -147,6 +147,16 @@ export GOPATH=$HOME/projects/go GUIX_PROFILE="$HOME/.guix-profile/" GUIX_LOCPATH="$GUIX_PROFILE/lib/locale/" -. "$GUIX_PROFILE/etc/profile" + +if [[ -d $GUIX_PROFILE ]]; +then + . "$GUIX_PROFILE/etc/profile" +fi + GUIX_PROFILE="$HOME/.config/guix/current" -. "$GUIX_PROFILE/etc/profile" + +if [[ -d $GUIX_PROFILE ]]; +then + . "$GUIX_PROFILE/etc/profile" +fi + From f2fe56fb18764148aecfee6b41d86a5ba17a4f54 Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Thu, 16 Sep 2021 21:54:14 +0200 Subject: [PATCH 2/2] [ZSH] WSL setup stuff --- shells/zshrc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/shells/zshrc b/shells/zshrc index ffbc1f8..1845e75 100644 --- a/shells/zshrc +++ b/shells/zshrc @@ -160,3 +160,12 @@ then . "$GUIX_PROFILE/etc/profile" fi +################# +### WSL STUFF ### +################# + +if [[ -n $WSL_DISTRO_NAME ]]; +then + export DISPLAY=$(ip route | awk '{print $3; exit}'):0 + export LIBGL_ALWAYS_INDIRECT=1 +fi