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.

Fix hostname detection on bashrc

Also in this commit, I do "git remote add" to the sourcehut mirror
of my dotfiles if not exists locally

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

+12 -7
+10 -5
.bashrc
··· 12 12 if [[ $TERMUX ]]; then 13 13 export SSH_AGENT_=todo 14 14 elif command -v keychain >> /dev/null; then 15 - export KEYCHAIN_PATh=$(command -v keychain) 15 + # shellcheck disable=SC2155 16 + export KEYCHAIN_PATH=$(command -v keychain) 16 17 eval $(keychain --agents gpg,ssh --eval) 17 18 fi 19 + # shellcheck disable=SC2155 18 20 export GPG_TTY=$(tty) 19 21 20 22 # how about detecting local configs ··· 28 30 if [[ $PROMPT_THEME == "disabled" ]]; then 29 31 true 30 32 elif [[ -f "$HOME/.config/bash/shell-prompts/${PROMPT_THEME}.bashrc" ]]; then 33 + # shellcheck disable=SC1090 31 34 source "$HOME/.config/bash/shell-prompts/${PROMPT_THEME}.bashrc" 32 35 else 33 36 source "$HOME/.config/bash/shell-prompts/vern.bashrc" ··· 56 59 57 60 ## Stage 2: Source literally everything else ## 58 61 if [[ -d "$HOME/.bashbox" ]]; then 62 + # shellcheck disable=SC1091 59 63 source "$HOME/.bashbox/env" 60 64 fi 61 65 62 66 # handle hostname generation for importing host-specific configs 63 67 # TODO: Handle detection when we don't have WSL_* variables on tmux shell sessions 64 68 if [[ $WSL_DISTRO_NAME ]] && [[ $WSL_INTEROP ]]; then 65 - HOSTNAME_BASH="${HOSTNAME}-wsl-${WSL_DISTRO_NAME}" 69 + HOSTNAME_BASH="$(cat /etc/hostname)-wsl-${WSL_DISTRO_NAME}" 66 70 export WSL=1 # similar to CODESPACES and GITPOD_WORKSPACE_ID vars 67 71 else 68 - HOSTNAME_BASH="${HOSTNAME}" 72 + HOSTNAME_BASH="$(cat /etc/hostname)" 69 73 fi 74 + export HOSTNAME_BASH 70 75 71 76 for file in "$HOME/.config/bash/hosts/${HOSTNAME_BASH}.bashrc" "${HOME}/.config/bash/bashrc"; do 72 - [ -f $file ] && . "$file" 77 + # shellcheck disable=SC1090 78 + [ -f "$file" ] && . "$file" 73 79 done 74 -
+2 -2
.config/yadm/bootstrap.d/00-post-clone-repo.sh
··· 11 11 fi 12 12 13 13 echo "Setting git remote URLs to SSH" 14 - git remote set-url origin ssh://git@mau.dev/andreijiroh.dev/dotfiles || true 15 - git remote set-url hut ssh://git@git.sr.ht/~ajhalili2006/dotfiles || true 14 + git remote set-url --add origin ssh://git@mau.dev/andreijiroh.dev/dotfiles || true 15 + git remote set-url --add hut ssh://git@git.sr.ht/~ajhalili2006/dotfiles || git remote add hut ssh://git@git.sr.ht/~ajhalili2006/dotfiles