-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.profile##template
85 lines (74 loc) · 2.78 KB
/
.profile##template
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# vi: filetype=sh
# From http://superuser.com/questions/183870/difference-between-bashrc-and-bash-profile/183980#183980
# ~/.profile is the place to put stuff that applies to your whole session,
# such as programs that you want to start when you log in (but not
# graphical programs, they go into a different file), and
# environment variable definitions.
# fix for QNAP devices - source this before appending any other PATH settings
# this will be removable after decommissioning the other NASs
if [ -f /Apps/opt/etc/profile ]; then
# shellcheck source=/dev/null
. /Apps/opt/etc/profile
fi
# for the new NAS
if [ -f /opt/etc/profile ]; then
# shellcheck source=/dev/null
. /opt/etc/profile
fi
set -o vi
export EDITOR=nvim
export LANG=en_US.UTF-8
export LC_ALL=$LANG
export VISUAL=nvim # crontab -e on qnap depends on VISUAL and apparently does not read EDITOR
{% if yadm.distro == "openSUSE" %}
export LESS="-MFRX" # default in /etc/profile is "-M -I -R"
# -X to quit without clearing screen (e.g. git diff)
# -F to quit if one screen
{% endif %}
# -------------------------------------------------------------------------
# PATH
{% if yadm.hostname == "DELT-C7D1WXVK73" %}
PATH="/opt/homebrew/opt/[email protected]/bin:\
$HOME/.cargo/bin:\
{% else %}
PATH="$HOME/.cargo/bin:\
{% endif %}
$HOME/.yarn/bin:\
$HOME/Documents/git_projects/csslint/dist:\
$HOME/bin:\
$HOME/local/bin:\
$HOME/dotfiles/local/bin:\
$HOME/dotfiles/os/bin:\
$HOME/dotfiles/bin:\
$HOME/dotfiles/bin/remarkable/host:\
/opt/homebrew/opt/gnu-tar/libexec/gnubin:\
$PATH"
export PATH
if [ -z "$BASH" ]; then
if [ "$(id -u)" -eq 0 ]; then
PS1='[\w] # '
else
PS1='[\w] $ '
fi
fi
# -------------------------------------------------------------------------
OS_SPECIFIC_PROFILE=~/.config/sh/profile.os.$(uname -s)
if [ -f $OS_SPECIFIC_PROFILE ]; then
# shellcheck source=/dev/null
. $OS_SPECIFIC_PROFILE
fi
HOST_SPECIFIC_PROFILE=~/.config/sh/profile.host.$(uname -n | cut -d. -f1)
if [ -f $HOST_SPECIFIC_PROFILE ]; then
# shellcheck source=/dev/null
. $HOST_SPECIFIC_PROFILE
fi
export SOPS_AGE_KEY_FILE="$HOME/.config/sops/age/keys.txt"
export SOPS_AGE_RECIPIENTS="age1xnpatet4zu07tqyr7yzcvedw02au4gjp4rmqlfx0dax9w5xfjqpqpgvk88"
export NVM_DIR="$HOME/.nvm"
# shellcheck source=/dev/null
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
# shellcheck source=/dev/null
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# If nvm installed with Homebrew, look in /usr/local:
[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm
[ -s "/usr/local/opt/nvm/etc/bash_completion.d/nvm" ] && . "/usr/local/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion