shell: only export ssl-related vars if the certs are available
[~bandali/configs] / .profile
1 # ~/.profile: executed by the command interpreter for login shells.
2 # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
3 # exists.
4
5 # source host-specific profile
6 if [ -f "$HOME/.config/profiles/$(hostname)" ]; then
7 . "$HOME/.config/profiles/$(hostname)"
8 fi
9
10 export EDITOR="emacsclient -nw"
11 export VISUAL="emcl"
12
13 PATH="$HOME/bin:$HOME/.local/bin:$PATH"
14 PATH="$HOME/.cabal/bin:$HOME/.cargo/bin:$HOME/.elan/bin:$PATH"
15 if [ -z "$IS_GUIX_SYSTEM" ]; then
16 PATH="$HOME/.config/guix/current/bin${PATH:+:}$PATH"
17 export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"
18 fi
19 export PATH
20
21 export XDG_CONFIG_HOME="$HOME/.config"
22 export XDG_DATA_HOME="$HOME/.local/share"
23
24 export INPUTRC="$XDG_CONFIG_HOME"/readline/inputrc
25 export SCREENRC="$XDG_CONFIG_HOME"/screen/screenrc
26
27 export MAILDIR="$HOME/mail"
28 export CVS_RSH="ssh"
29
30 export GOPATH="$HOME/src/go"
31
32 # if running bash
33 if [ -n "$BASH_VERSION" ]; then
34 # include .bashrc if it exists
35 if [ -f "$HOME/.bashrc" ]; then
36 . "$HOME/.bashrc"
37 fi
38 fi
39
40 if [ -z "$IS_GUIX_SYSTEM" ]; then
41 # if guix is installed
42 if [ -x "$(command -v guix)" ]; then
43 SSL_CERT_DIR="$HOME/.guix-profile/etc/ssl/certs"
44 if [ -d "$SSL_CERT_DIR" -o -h "$SSL_CERT_DIR" ]; then
45 export SSL_CERT_DIR
46 export SSL_CERT_FILE="$HOME/.guix-profile/etc/ssl/certs/ca-certificates.crt"
47 else
48 printf "it seems you forgot to \`guix install nss-certs\'\n"
49 fi
50 GUIX_PROFILE="$HOME/.guix-profile"
51 . "$GUIX_PROFILE/etc/profile"
52 fi
53 fi
54
55 setxkbmap \
56 -layout us,ir \
57 -option ctrl:nocaps \
58 -option grp:shifts_toggle
59
60 xmodmap -e "keysym Menu = Super_R"
61
62 xrdb -merge "$HOME/.Xresources"