-
Notifications
You must be signed in to change notification settings - Fork 4
/
.commonrc
64 lines (49 loc) · 1.34 KB
/
.commonrc
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
dotfiles=$( dirname `readlink ~/.commonrc` )
#$dotfiles/update.sh
command_exists() {
type "${1}" &> /dev/null ;
}
# Editor
export EDITOR="vim"
# Load aliases
[[ -f "$HOME/.aliases" ]] && source "$HOME/.aliases"
[[ -f "$HOME/.dockerfunc" ]] && source "$HOME/.dockerfunc"
[[ -f "$HOME/.localrc" ]] && source "$HOME/.localrc"
if command_exists gpg2; then
alias gpg=gpg2
fi
# Adjust $PATH
export PATH=$PATH:$dotfiles/utils
# Add snap binaries
export PATH=$PATH:/snap/bin
# Include rust binaries
cargo_path="$HOME/.cargo/bin"
if [[ -d ${cargo_path} ]]; then
export PATH="${PATH}:${cargo_path}"
fi
# Include npm binaries
npm_path=~/.node_modules_global/bin
if [[ -d ${npm_path} ]]; then
export PATH="${PATH}:${npm_path}"
fi
if [ -d "${HOME}/.yay/" ]; then
yay remind
yay check
fi
# Neovim default if installed
if command -v nvim &> /dev/null; then
EDITOR='nvim'
alias vim='nvim'
fi
# Add dockerized mc if it doesn't exist
if ! command -v mc &> /dev/null; then
alias mc="docker run -it -w /workdir -v $(pwd):/workdir -v ~/.mc:/root/.mc minio/mc"
fi
# Locale
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
# Misc settings
export VAGRANT_DEFAULT_PROVIDER=virtualbox
# vim: ft=sh
# added by Nix installer
if [ -e /home/britt/.nix-profile/etc/profile.d/nix.sh ]; then source /home/britt/.nix-profile/etc/profile.d/nix.sh; fi