-
Notifications
You must be signed in to change notification settings - Fork 1
/
dot_profile.tmpl
46 lines (39 loc) · 1.64 KB
/
dot_profile.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/false
# vi: ft=sh
# Make Cargo binaries available
[ -d "$HOME/.cargo/bin" ] && export PATH="$PATH:$HOME/.cargo/bin"
# Store all Cargo build artifacts in one place
# This also allows reusing build results between projects
export CARGO_TARGET_DIR="$HOME/.cache/cargo/target"
# Relocate Rust toolchains to ~/.cache
export RUSTUP_HOME="$HOME/.cache/rustup"
# Move GOPATH out of sight
export GOPATH="$HOME/.cache/go"
# go installe'ed binaries
[ -d "$HOME/.cache/go/bin" ] && export PATH="$PATH:$HOME/.cache/go/bin"
# Include my scripts into PATH
[ -e "$HOME/bin" ] && export PATH="$PATH:$HOME/bin"
[ -e "$HOME/code/scripts" ] && export PATH="$PATH:$HOME/code/scripts"
[ -e "$HOME/code/env" ] && export PATH="$PATH:$HOME/code/env"
# Include user executables into PATH (used by pip)
[ -d "$HOME/.local/bin" ] && export PATH="$PATH:$HOME/.local/bin"
# Homebrew binaries
[ -d "/home/linuxbrew" ] && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
if [ -d "/opt/homebrew/" ]; then
export HOMEBREW_NO_AUTO_UPDATE
eval "$(/opt/homebrew/bin/brew shellenv)"
# Use homebrew utilities instead of macOS provided commands
PATH="$(brew --prefix)/opt/coreutils/libexec/gnubin:$PATH"
PATH="$(brew --prefix)/opt/gnu-sed/libexec/gnubin:$PATH"
fi
command -v jenv &> /dev/null && eval "$(jenv init -)"
export EDITOR=nvim
# Use all available cores when possible
export XZ_DEFAULTS='--threads=0'
export ZSTD_COMPRESS="--threads=0"
cores=$(nproc)
export MAKEFLAGS="-j$cores"
# Source local profile
[ -f "$HOME/.profile.local" ] && source "$HOME/.profile.local"
# Source bashrc for bash login sessions too
[ "$BASH" ] && [ -f "$HOME/.bashrc" ] && source "$HOME/.bashrc"