Select the types of activity you want to include in your feed.
Personal dotfiles for Linux, mostly for Nixpkgs/NixOS-based and Termux setups. Mirrored using GitLab's push mirroring feature.
gitlab.com/andreijiroh-dev/dotfiles
···11+#!/usr/bin/env bash
22+33+# This is my meta bashrc file, with oh-my-posh instead of zsh-specific
44+# oh-my-zsh, although I still use zsh as my default shell. Sorry for a
55+# lot of personal commentary and links hellscape here, it's there for
66+# in-code docs and for future me to not dig through 'git log' hell.
77+# SPDX-License-Identifier: TBD
88+99+## Stage 0: Init keychain + GPG_TTY for pinentry hellscapes in TUI. ##
1010+## This stage also initalizes oh-my-posh here. ##
1111+if [[ $TERMUX ]]; then
1212+ export SSH_AGENT_=todo
1313+else
1414+ eval $(keychain --agents gpg,ssh --eval)
1515+fi
1616+export GPG_TTY=$(tty)
1717+# Tip: I don't want to f**k things up on POSIX-based stuff, I might try
1818+# using
1919+if command -v oh-my-posh >>/dev/null; then
2020+ eval "$(oh-my-posh init bash)"
2121+fi
2222+2323+## Stage 1: Init custom vars and shortcuts before anything else ##
2424+# Dotfiles stuff, maybe should be on ~/.env?
2525+export DOTFILES_HOME="$HOME/.dotfiles"
2626+export DOTFILES_BIN="$DOTFILES_HOME/bin"
2727+# gopath should be on ~/.local/share/go to not fuck up with local install
2828+# at ~/go if exists
2929+export GOPATH="$HOME/.local/share/go"
3030+# Shut up, VS Code (not the OSS distributions off github:microsoft/vscode).
3131+# Don't let me pay for JetBrains IDEs or go nuts with nvim (or emacs, since
3232+# I'm both a bit neutral and off the rails at Vim vs Emacs debate). Also RIP
3333+# to my first editor after Notepad that started my web dev + Linux journey,
3434+# Atom (https://github.com/atom).
3535+export EDITOR=nano
3636+# For compartibility reasons and not to fuck things up on ~/go/bin.
3737+# Custom path might be also on ~/.env too?
3838+export PATH="$DOTFILES_BIN:$HOME/go/bin:$HOME/.local/bin:$GOPATH/bin:$PATH"
3939+# It would be nice if I would work on self-hosted reimplementation of
4040+# proxy.golang.org, but in meanwhile, you need to fuck off Google on this.
4141+# (Fucking Facebook and Microsoft off your lives are also hard too ICYMI.)
4242+# Context: https://git.sr.ht/~sircmpwn/dotfiles/tree/master/item/.profile#L13-15
4343+# and https://drewdevault.com/2021/08/06/goproxy-breaks-go.html
4444+export GOPROXY=direct GOSUMDB=off
4545+4646+## Stage 2: Source literally everything else ##
4747+if [[ -d "$HOME/.bashbox" ]]; then
4848+ source "$HOME/.bashbox/env"
4949+fi
5050+5151+export HOMEBREW_HOME=${HOMEBREW_HOME:-"/home/linuxbrew/.linuxbrew"}
5252+test -d "$HOMEBREW_HOME" && eval "$($HOMEBREW_HOME/bin/brew shellenv)"
5353+[[ -r "$HOMEBREW_HOME/etc/profile.d/bash_completion.sh" ]] && . "$HOMEBREW_HOME/etc/profile.d/bash_completion.sh"
+42
.env
···11+#!/usr/bin/env sh
22+33+# SPDX-License-Identifier: MIT AND MPL-2.0
44+#
55+# This is POSIX sh-compartible shell script to sourced for both shortcuts
66+# to daily commands I use and then some.
77+#
88+# PLEASE DO NOT LEAK ANY SECRETS, INCLUDING DOPPLER CLI TOKENS AND TAILSCALE_AUTHKEYS
99+# IN THIS BLOODY FILE!
1010+#
1111+# https://packaging.ubuntu.com/html/getting-set-up.html#configure-your-shell
1212+export DEBFULLNAME="Andrei Jiroh Halili"
1313+# Temporary Gmail address for devel stuff, even through my longer email one is, well,
1414+# on my public GPG key btw, so YOLO it.
1515+export DEBEMAIL="ajhalili2006@gmail.com"
1616+1717+##########################################################################################
1818+# Code snippets from https://git.sr.ht/~sircmpwn/dotfiles/tree/db5945a4/item/.env
1919+##########################################################################################
2020+if ls --version 2>&1 | grep -i gnu >/dev/null
2121+then
2222+ alias ls='ls --color=auto '
2323+elif ls --version 2>&1 | grep -i busybox >/dev/null
2424+then
2525+ alias ls='ls --color=auto '
2626+fi
2727+2828+alias recent='ls -ltch'
2929+3030+# Add optmizations for multicore builds
3131+if [ $(uname) = "Linux" ]
3232+then
3333+ nproc=$(grep '^processor' /proc/cpuinfo | wc -l)
3434+ if [ $nproc -gt 4 ]
3535+ then
3636+ # Reserve two cores
3737+ nproc=$((nproc - 2))
3838+ fi
3939+ export MAKEFLAGS="-j$nproc"
4040+ export SAMUFLAGS="-j$nproc"
4141+fi
4242+##########################################################################################
+9
.profile
···11+# if running bash
22+if [ -n "$BASH_VERSION" ]; then
33+ # include .bashrc if it exists
44+ if [ -f "$HOME/.bashrc" ]; then
55+ . "$HOME/.bashrc"
66+ fi
77+fi
88+99+source "$HOME/.env"