Skip to content

Commit 3367898

Browse files
committed
Allow it to work on Nix
1 parent 5620208 commit 3367898

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

.bashrc

+12-11
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ esac
4343
# colored GCC warnings and errors
4444
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
4545

46+
# if hash nix-env 2>/dev/null; then
47+
# LOCALE_ARCHIVE="$(nix-env --installed --no-name --out-path --query glibc-locales)/lib/locale/locale-archive"
48+
# export LOCALE_ARCHIVE
49+
# fi
50+
if [ -f "$HOME"/.nix-profile/etc/profile.d/hm-session-vars.sh ]; then
51+
# shellcheck source=/dev/null
52+
source "$HOME"/.nix-profile/etc/profile.d/hm-session-vars.sh
53+
fi
4654
if hash vim 2>/dev/null; then
4755
export EDITOR=vim
4856
fi
@@ -54,14 +62,6 @@ if [ -d "$N_PREFIX" ]; then
5462
export PATH=$N_PREFIX/bin:$PATH
5563
export N_PREFIX
5664
fi
57-
DENO_INSTALL=$HOME/.deno/bin
58-
if hash dvm 2>/dev/null || [ -x "$DENO_INSTALL"/deno ]; then
59-
if ! [ -d "$DENO_INSTALL" ]; then
60-
mkdir -p "$DENO_INSTALL"
61-
fi
62-
export PATH=$DENO_INSTALL:$PATH
63-
fi
64-
unset DENO_INSTALL
6565
if [ -d "$HOME"/.dotnet/tools ] && ! [[ $PATH =~ "$HOME"/.dotnet/tools ]]; then
6666
export PATH=$PATH:$HOME/.dotnet/tools
6767
fi
@@ -73,7 +73,7 @@ if hash sccache 2>/dev/null; then
7373
RUSTC_WRAPPER=`which sccache`
7474
export RUSTC_WRAPPER
7575
fi
76-
if [ -e "$HOME"/.krew/bin/kubectl-krew ]; then
76+
if [ -d "$HOME"/.krew/bin ]; then
7777
export PATH=$PATH:$HOME/.krew/bin
7878
fi
7979
if [ -e "$HOME"/.go/bin/go ]; then
@@ -117,7 +117,8 @@ fi
117117
# fi
118118

119119
if ! [ -v XDG_RUNTIME_DIR ]; then
120-
export XDG_RUNTIME_DIR=/run/user/`id -u`/
120+
XDG_RUNTIME_DIR=/run/user/`id -u`/
121+
export XDG_RUNTIME_DIR
121122
if ! [ -d "$XDG_RUNTIME_DIR" ]; then
122123
mkdir -p "$XDG_RUNTIME_DIR"
123124
chmod 755 "$XDG_RUNTIME_DIR"
@@ -127,7 +128,7 @@ fi
127128
# setup ssh-agent
128129
# only setup ssh agent if not previosly set
129130
if ! [ -v SSH_AUTH_SOCK ]; then
130-
SSH_DIR=${XDG_RUNTIME_DIR}gnupg
131+
SSH_DIR=$XDG_RUNTIME_DIR/gnupg
131132
if ! [ -d "$SSH_DIR" ]; then
132133
mkdir -p "$SSH_DIR"
133134
chmod 700 "$SSH_DIR"

0 commit comments

Comments
 (0)