From 7d3cf39eb80273d85205309d59513cebf90740d9 Mon Sep 17 00:00:00 2001 From: Andrei Jiroh Eugenio Halili Date: Thu, 16 Sep 2021 21:36:56 +0800 Subject: [PATCH] modify Linux nanorc and bashrc for Debian The ubuntu Bashrc file will be renamed to bashrc/debian.bashrc, since my bashrc for Ubuntu also flawlessly work on debian too. The bootstrap script might need more work than intended to install Git and CPython from the backports. Signed-off-by: Andrei Jiroh Eugenio Halili --- .envrc.example | 3 +++ .gitignore | 1 + bashrc/ubuntu.bashrc | 29 +++++++++++++++++------------ gitconfig/linux | 21 ++++++++++++--------- nanorc/config/linux.nanorc | 10 +++++++--- 5 files changed, 40 insertions(+), 24 deletions(-) create mode 100644 .envrc.example diff --git a/.envrc.example b/.envrc.example new file mode 100644 index 0000000..a12a508 --- /dev/null +++ b/.envrc.example @@ -0,0 +1,3 @@ +# Doppler token for use in GitLab stuff, KEK +# Do not leak this BS! Otherwise, we might be fucked. +export DOPPLER_TOKEN=dp.st.mikedmoy.thisTokenIsFrickingBullshitDontLeakIt diff --git a/.gitignore b/.gitignore index 956d472..cd75b94 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /secrets +.envrc diff --git a/bashrc/ubuntu.bashrc b/bashrc/ubuntu.bashrc index 2996afb..d65f3d7 100644 --- a/bashrc/ubuntu.bashrc +++ b/bashrc/ubuntu.bashrc @@ -79,8 +79,8 @@ esac if [ -x /usr/bin/dircolors ]; then test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" alias ls='ls --color=auto' - #alias dir='dir --color=auto' - #alias vdir='vdir --color=auto' + alias dir='dir --color=auto' + alias vdir='vdir --color=auto' alias grep='grep --color=auto' alias fgrep='fgrep --color=auto' @@ -150,19 +150,20 @@ else esac fi -# As long as possible, attempt to setup our GnuPG agent when -# we're on an SSH session. +# As long as possible, attempt to setup our GnuPG agent when we're on an SSH session. if [[ -n "$SSH_CLIENT" ]] || [[ -n "$SSH_TTY" ]]; then eval $(keychain --agents gpg,ssh --eval --nogui --noinherit) export GPG_TTY=$(tty) else # We'll do some checks here btw, Currently I use GNOME and Xfce4 as my desktop environments case $(ps -o comm= -p $PPID) in - sshd | */sshd) eval $(keychain --agents gpg,ssh --eval --nogui --noinherit);; - xfce*) eval $(keychain --agents gpg,ssh --eval);; - gnome*) eval $(keychain --agents gpg,ssh --eval);; - code) eval $(keychain --agents gpg,ssh --eval);; - *) eval $(keychain --agents gpg,ssh --eval --nogui --noinherit) ;; + # Sometimes, $SSH_CLIENT and/or $SSH_TTY doesn't exists so we'll pull what ps says + sshd | */sshd) eval $(keychain --agents gpg,ssh --eval --nogui --noinherit);; + xfce*) eval $(keychain --agents gpg,ssh --eval);; + gnome*) eval $(keychain --agents gpg,ssh --eval);; + # Don't forget VS Code and code-server! + code) eval $(keychain --agents gpg,ssh --eval);; + *) eval $(keychain --agents gpg,ssh --eval --nogui --noinherit) ;; esac fi @@ -175,13 +176,14 @@ source "$HOME/.dotfiles/bashrc/chain-source" # https://packaging.ubuntu.com/html/getting-set-up.html#configure-your-shell export DEBFULLNAME="Andrei Jiroh Halili" -## can't add this email to my Launchpad profile, probably because I'm using an free domain lol. -export DEBEMAIL="andreijiroh@madebythepins.tk" +# Temporary Gmail address for devel stuff, even through my longer email one is, well, +# on my public GPG key btw, so YOLO it. +export DEBEMAIL="ajhalili2006@gmail.com" # Homebrew test -d /home/linuxbrew/.linuxbrew && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" -# Golang +# Golang, probably we need to tweak this btw export PATH=/home/gildedguy/go/bin:$PATH GOPATH=/home/gildedguy/go # Use native builds when doing 'docker build' instead of 'docker buildx build' @@ -189,3 +191,6 @@ export DOCKER_BUILDKIT=1 # Generated for envman. Do not edit. [ -s "$HOME/.config/envman/load.sh" ] && source "$HOME/.config/envman/load.sh" + +# direnv +eval "$(direnv hook bash)" diff --git a/gitconfig/linux b/gitconfig/linux index 73b6f03..5b0ee81 100644 --- a/gitconfig/linux +++ b/gitconfig/linux @@ -2,18 +2,18 @@ helper = !gh auth git-credential [user] - email = andreijiroh@madebythepins.tk + email = ajhalili2006@gmail.com name = Andrei Jiroh Eugenio Halili signingkey = A30EBE40AD856D88 #editor = code --wait -[merge] - tool = vscode -[mergetool "vscode"] - cmd = code --wait $MERGED -[diff] - tool = vscode -[difftool "vscode"] - cmd = code --wait --diff $LOCAL $REMOTE +#[merge] +# tool = vscode +#[mergetool "vscode"] +# cmd = code --wait $MERGED +#[diff] +# tool = vscode +#[difftool "vscode"] +# cmd = code --wait --diff $LOCAL $REMOTE [commit] gpgsign = true @@ -26,6 +26,9 @@ [url "git+ssh://ajhalili2006@git.launchpad.net/"] insteadof = lp: pushInsteadOf = lp: +[url "git+ssh://git@gitlab.alpinelinux.org/"] + insteadof = alpine: + pushInsteadOf = alpine: [url "git@gitlab.com:"] insteadOf = https://gitlab.com/ pushInsteadOf = https://gitlab.com/ diff --git a/nanorc/config/linux.nanorc b/nanorc/config/linux.nanorc index f41cbe8..16aa459 100644 --- a/nanorc/config/linux.nanorc +++ b/nanorc/config/linux.nanorc @@ -1,5 +1,9 @@ # import package defaults first -include /usr/share/nano/* +include /usr/share/nano/*.nanorc +include /usr/share/nano/extra/*.nanorc -# then import ours -include /home/gildedguy/.dotfiles/nanorc/highlighting/*.nanorc +# then import ours, but trust our distro packages +#include ~/.dotfiles/nanorc/highlighting/*.nanorc + +# enable multibuffer stuff +set multibuffer