emacs: add binding for guix-patches debbugs
[~bandali/configs] / .profile
CommitLineData
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
6if [ -f "$HOME/.config/profiles/$(hostname)" ]; then
7 . "$HOME/.config/profiles/$(hostname)"
8fi
9
2446aab5
AB
10export EDITOR="emacsclient -nw"
11export VISUAL="emcl"
d99f86cd 12
a71a12e1 13PATH="$HOME/usr/local/bin:$HOME/.local/bin:$PATH"
9daac239 14PATH="$HOME/.cabal/bin:$HOME/.cargo/bin:$HOME/.elan/bin:$PATH"
47d195d9 15if [ -z "$IS_GUIX_SYSTEM" ]; then
09b0be0b 16 PATH="$HOME/.config/guix/current/bin${PATH:+:}$PATH"
a71a12e1 17 INFOPATH="$HOME/.config/guix/current/share/info${INFOPATH:+:}$INFOPATH"
09b0be0b 18 export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"
47d195d9 19fi
9daac239 20export PATH
a71a12e1 21export INFOPATH
a75331ab 22
0f10b2c2
AB
23export XDG_CONFIG_HOME="$HOME/.config"
24export XDG_DATA_HOME="$HOME/.local/share"
9daac239 25
8e0e4297
AB
26if [ -f "$HOME/.config/user-dirs.dirs" ]; then
27 set -a
28 . "$HOME/.config/user-dirs.dirs"
29 set +a
30fi
31
9daac239
AB
32export INPUTRC="$XDG_CONFIG_HOME"/readline/inputrc
33export SCREENRC="$XDG_CONFIG_HOME"/screen/screenrc
a75331ab 34
0f10b2c2
AB
35export MAILDIR="$HOME/mail"
36export CVS_RSH="ssh"
a75331ab 37
9daac239
AB
38export GOPATH="$HOME/src/go"
39
40# if running bash
41if [ -n "$BASH_VERSION" ]; then
42 # include .bashrc if it exists
43 if [ -f "$HOME/.bashrc" ]; then
44 . "$HOME/.bashrc"
45 fi
46fi
47
47d195d9
AB
48if [ -z "$IS_GUIX_SYSTEM" ]; then
49 # if guix is installed
50 if [ -x "$(command -v guix)" ]; then
3dfefa51
AB
51 SSL_CERT_DIR="$HOME/.guix-profile/etc/ssl/certs"
52 if [ -d "$SSL_CERT_DIR" -o -h "$SSL_CERT_DIR" ]; then
53 export SSL_CERT_DIR
54 export SSL_CERT_FILE="$HOME/.guix-profile/etc/ssl/certs/ca-certificates.crt"
55 else
56 printf "it seems you forgot to \`guix install nss-certs\'\n"
57 fi
47d195d9
AB
58 GUIX_PROFILE="$HOME/.guix-profile"
59 . "$GUIX_PROFILE/etc/profile"
60 fi
61fi
62
c0ace3ce
AB
63# start an ssh-agent (with guix's openssh)
64if [ -z "$IS_GUIX_SYSTEM" ]; then
65 if ! pgrep -u "$USER" ssh-agent > /dev/null; then
66 ssh-agent > ~/.ssh-agent-thing
67 fi
68 if [[ ! "$SSH_AUTH_SOCK" ]]; then
69 eval "$(<~/.ssh-agent-thing)"
70 fi
71fi
72
b91f8784
AB
73# footenote: when on a foreign distro and using Xfce, don't forget to
74# disable its auto-start of gpg- and ssh-agent, by issuing
75# xfconf-query -c xfce4-session -p /startup/ssh-agent/enabled -n -t bool -s false
76# xfconf-query -c xfce4-session -p /startup/gpg-agent/enabled -n -t bool -s false
77# see https://docs.xfce.org/xfce/xfce4-session/advanced#ssh_and_gpg_agents
78# also, MATE does something similar with gnome-keyring-daemon:
79# http://william.shallum.net/random-notes/disabling-gnome-keyring-daemon-ssh-agent-on-mate-desktop