Commit | Line | Data |
---|---|---|
9daac239 AB |
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. | |
14623136 | 4 | |
47d195d9 AB |
5 | # source host-specific profile |
6 | if [ -f "$HOME/.config/profiles/$(hostname)" ]; then | |
7 | . "$HOME/.config/profiles/$(hostname)" | |
8 | fi | |
9 | ||
2446aab5 AB |
10 | export EDITOR="emacsclient -nw" |
11 | export VISUAL="emcl" | |
d99f86cd | 12 | |
9daac239 AB |
13 | PATH="$HOME/bin:$HOME/.local/bin:$PATH" |
14 | PATH="$HOME/.cabal/bin:$HOME/.cargo/bin:$HOME/.elan/bin:$PATH" | |
47d195d9 | 15 | if [ -z "$IS_GUIX_SYSTEM" ]; then |
09b0be0b AB |
16 | PATH="$HOME/.config/guix/current/bin${PATH:+:}$PATH" |
17 | export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale" | |
47d195d9 | 18 | fi |
9daac239 | 19 | export PATH |
a75331ab | 20 | |
0f10b2c2 AB |
21 | export XDG_CONFIG_HOME="$HOME/.config" |
22 | export XDG_DATA_HOME="$HOME/.local/share" | |
9daac239 AB |
23 | |
24 | export INPUTRC="$XDG_CONFIG_HOME"/readline/inputrc | |
25 | export SCREENRC="$XDG_CONFIG_HOME"/screen/screenrc | |
a75331ab | 26 | |
0f10b2c2 AB |
27 | export MAILDIR="$HOME/mail" |
28 | export CVS_RSH="ssh" | |
a75331ab | 29 | |
9daac239 AB |
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 | ||
47d195d9 AB |
40 | if [ -z "$IS_GUIX_SYSTEM" ]; then |
41 | # if guix is installed | |
42 | if [ -x "$(command -v guix)" ]; then | |
3dfefa51 AB |
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 | |
47d195d9 AB |
50 | GUIX_PROFILE="$HOME/.guix-profile" |
51 | . "$GUIX_PROFILE/etc/profile" | |
52 | fi | |
53 | fi | |
54 | ||
c0ace3ce AB |
55 | # start an ssh-agent (with guix's openssh) |
56 | if [ -z "$IS_GUIX_SYSTEM" ]; then | |
57 | if ! pgrep -u "$USER" ssh-agent > /dev/null; then | |
58 | ssh-agent > ~/.ssh-agent-thing | |
59 | fi | |
60 | if [[ ! "$SSH_AUTH_SOCK" ]]; then | |
61 | eval "$(<~/.ssh-agent-thing)" | |
62 | fi | |
63 | fi | |
64 | ||
9daac239 | 65 | setxkbmap \ |
a38abd4c | 66 | -layout us,ir \ |
9daac239 | 67 | -option ctrl:nocaps \ |
9daac239 | 68 | -option grp:shifts_toggle |
a38abd4c AB |
69 | |
70 | xmodmap -e "keysym Menu = Super_R" | |
71 | ||
72 | xrdb -merge "$HOME/.Xresources" | |
b91f8784 AB |
73 | |
74 | # footenote: when on a foreign distro and using Xfce, don't forget to | |
75 | # disable its auto-start of gpg- and ssh-agent, by issuing | |
76 | # xfconf-query -c xfce4-session -p /startup/ssh-agent/enabled -n -t bool -s false | |
77 | # xfconf-query -c xfce4-session -p /startup/gpg-agent/enabled -n -t bool -s false | |
78 | # see https://docs.xfce.org/xfce/xfce4-session/advanced#ssh_and_gpg_agents | |
79 | # also, MATE does something similar with gnome-keyring-daemon: | |
80 | # http://william.shallum.net/random-notes/disabling-gnome-keyring-daemon-ssh-agent-on-mate-desktop |