Personal dotfiles for Linux, mostly for Nixpkgs/NixOS-based and Termux setups. Mirrored using GitLab's push mirroring feature. gitlab.com/andreijiroh-dev/dotfiles
linux dotfiles
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore(shellrc): update bashrc and profile to load up $GOPATH/bin

Signed-off-by: Andrei Jiroh Halili <ajhalili2006@andreijiroh.xyz>

+24 -40
+2 -28
.bashrc
··· 24 24 . "$HOME/.config/localconfig.env" 25 25 fi 26 26 27 - if command -v oh-my-posh >>/dev/null && [[ $FF_USE_OHMYPOSH != "false" ]]; then 28 - eval "$(oh-my-posh init bash)" 29 - else 30 - if [[ $PROMPT_THEME == "disabled" ]]; then 31 - true 32 - elif [[ -f "$HOME/.config/bash/shell-prompts/${PROMPT_THEME}.bashrc" ]]; then 33 - # shellcheck disable=SC1090 34 - source "$HOME/.config/bash/shell-prompts/${PROMPT_THEME}.bashrc" 35 - else 36 - source "$HOME/.config/bash/shell-prompts/vern.bashrc" 37 - fi 38 - fi 39 - 40 27 ## Stage 1: Init custom vars and shortcuts before anything else ## 41 28 ## Note that ~/.env and ~/.env.local should be loaded eariler on ## 42 29 # Dotfiles stuff, maybe should be on ~/.env? ··· 45 32 # gopath should be on ~/.local/share/go to not fuck up with local install 46 33 # at ~/go if exists 47 34 export GOPATH="$HOME/.local/share/go" 35 + export PATH="${GOPATH}/bin:${PATH}" 48 36 # Shut up, VS Code (not the OSS distributions off github:microsoft/vscode). 49 37 # Don't let me pay for JetBrains IDEs or go nuts with nvim (or emacs, since 50 38 # I'm both a bit neutral and off the rails at Vim vs Emacs debate). Also RIP ··· 63 51 source "$HOME/.bashbox/env" 64 52 fi 65 53 66 - # Formerly: handle hostname generation for importing host-specific configs 67 - # TODO: Handle detection across distributions without chaos, especially where 68 - # Nix is installed (not NixOS) 69 - if [[ $WSL_DISTRO_NAME ]] && [[ $WSL_INTEROP ]]; then 70 - HOSTNAME_BASH="$(cat /etc/hostname)-wsl-${WSL_DISTRO_NAME}" 71 - export WSL=1 # similar to CODESPACES and GITPOD_WORKSPACE_ID vars 72 - else 73 - HOSTNAME_BASH="$(cat /etc/hostname)" 74 - fi 75 - export HOSTNAME_BASH 76 - 77 - for file in "$HOME/.config/bash/hosts/${HOSTNAME_BASH}.bashrc" "${HOME}/.config/bash/bashrc"; do 78 - # shellcheck disable=SC1090 79 - [ -f "$file" ] && . "$file" 80 - done 54 + source "$HOME/.config/bash/bashrc"
+19 -11
.config/bash/bashrc
··· 3 3 # for examples 4 4 5 5 # If not running interactively, don't do anything 6 - #case $- in 7 - # *i*) ;; 8 - # *) return;; 9 - #esac 6 + case $- in 7 + *i*) ;; 8 + *) return;; 9 + esac 10 10 11 11 # don't put duplicate lines or lines starting with space in the history. 12 12 # See bash(1) for more options ··· 52 52 fi 53 53 54 54 # If this is an xterm set the title to user@host:dir 55 - case "$TERM" in 56 - xterm*|rxvt*) 57 - PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" 58 - ;; 59 - *) 60 - ;; 61 - esac 55 + if command -v oh-my-posh >>/dev/null && [[ $FF_USE_OHMYPOSH != "false" ]]; then 56 + eval "$(oh-my-posh init bash)" 57 + else 58 + if [[ $PROMPT_THEME == "disabled" ]]; then 59 + true 60 + elif [[ -f "$HOME/.config/bash/shell-prompts/${PROMPT_THEME}.bashrc" ]]; then 61 + # shellcheck disable=SC1090 62 + source "$HOME/.config/bash/shell-prompts/${PROMPT_THEME}.bashrc" 63 + else 64 + source "$HOME/.config/bash/shell-prompts/vern.bashrc" 65 + fi 66 + fi 62 67 63 68 # colored GCC warnings and errors 64 69 export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' ··· 82 87 . /etc/bash_completion 83 88 fi 84 89 fi 90 + 91 + [ -f "${HOME}/.config/bash/hosts/${HOSTNAME_BASH}.bashrc" ] \ 92 + && . "${HOME}/.config/bash/hosts/${HOSTNAME_BASH}.bashrc"
+3 -1
.profile
··· 27 27 PATH="$HOME/.local/bin:$PATH" 28 28 fi 29 29 30 - export PATH="/usr/local/bin:$HOME/.local/bin:$HOME/bin${PATH:+:}$PATH:$HOME/.local/share/JetBrains/Toolbox/scripts" # ~vern specifics and more 30 + # Add $GOPATH/bin into PATH 31 + export GOPATH="$HOME/.local/share/go" 32 + export PATH="$GOPATH/bin:$PATH" 31 33 mesg n 2> /dev/null || true 32 34 33 35 # then import the rest