| 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/.cabal/bin:$HOME/.cargo/bin:$HOME/.elan/bin:$PATH" |
| 14 | if [ -z "$IS_GUIX_SYSTEM" ]; then |
| 15 | PATH="$HOME/.config/guix/current/bin${PATH:+:}$PATH" |
| 16 | INFOPATH="$HOME/.config/guix/current/share/info${INFOPATH:+:}$INFOPATH" |
| 17 | export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale" |
| 18 | fi |
| 19 | export PATH |
| 20 | export INFOPATH |
| 21 | |
| 22 | export MY_GUIX_MANIFESTS="$HOME/.config/guix/manifest" |
| 23 | export MY_GUIX_PROFILES="$HOME/.config/guix/profile" |
| 24 | |
| 25 | export XDG_CONFIG_HOME="$HOME/.config" |
| 26 | export XDG_DATA_HOME="$HOME/.local/share" |
| 27 | |
| 28 | if [ -f "$HOME/.config/user-dirs.dirs" ]; then |
| 29 | set -a |
| 30 | . "$HOME/.config/user-dirs.dirs" |
| 31 | set +a |
| 32 | fi |
| 33 | |
| 34 | export INPUTRC="$XDG_CONFIG_HOME"/readline/inputrc |
| 35 | export SCREENRC="$XDG_CONFIG_HOME"/screen/screenrc |
| 36 | |
| 37 | export MAILDIR="$HOME/mail" |
| 38 | export CVS_RSH="ssh" |
| 39 | |
| 40 | if [ -x "$(command -v go)" ]; then |
| 41 | export GOPATH="$HOME/src/go" |
| 42 | export PATH="$GOPATH/bin:$PATH" |
| 43 | fi |
| 44 | |
| 45 | # if running bash |
| 46 | if [ -n "$BASH_VERSION" ]; then |
| 47 | # include .bashrc if it exists |
| 48 | if [ -f "$HOME/.bashrc" ]; then |
| 49 | . "$HOME/.bashrc" |
| 50 | fi |
| 51 | fi |
| 52 | |
| 53 | if [ -z "$IS_GUIX_SYSTEM" ]; then |
| 54 | # if guix is installed |
| 55 | if [ -x "$(command -v guix)" ]; then |
| 56 | SSL_CERT_DIR="$HOME/.guix-profile/etc/ssl/certs" |
| 57 | if [ -d "$SSL_CERT_DIR" -o -h "$SSL_CERT_DIR" ]; then |
| 58 | export SSL_CERT_DIR |
| 59 | export SSL_CERT_FILE="$HOME/.guix-profile/etc/ssl/certs/ca-certificates.crt" |
| 60 | else |
| 61 | printf "it seems you forgot to \`guix install nss-certs\'\n" |
| 62 | fi |
| 63 | GUIX_PROFILE="$HOME/.guix-profile" |
| 64 | . "$GUIX_PROFILE/etc/profile" |
| 65 | unset XDG_DATA_DIRS |
| 66 | fi |
| 67 | fi |
| 68 | |
| 69 | for p in $MY_GUIX_PROFILES/*; do |
| 70 | profile=$p/$(basename "$p") |
| 71 | if [ -f "$profile"/etc/profile ]; then |
| 72 | GUIX_PROFILE="$profile" |
| 73 | . "$GUIX_PROFILE"/etc/profile |
| 74 | fi |
| 75 | unset profile |
| 76 | done |
| 77 | |
| 78 | export PATH="$HOME/u/local/bin:$HOME/.local/bin:$PATH" |
| 79 | |
| 80 | # start an ssh-agent (with guix's openssh) |
| 81 | if [ -z "$IS_GUIX_SYSTEM" ]; then |
| 82 | if ! pgrep -u "$USER" ssh-agent > /dev/null; then |
| 83 | ssh-agent > ~/.ssh-agent-thing |
| 84 | fi |
| 85 | if [[ ! "$SSH_AUTH_SOCK" ]]; then |
| 86 | eval "$(<~/.ssh-agent-thing)" |
| 87 | fi |
| 88 | fi |
| 89 | |
| 90 | # footenote: when on a foreign distro and using Xfce, don't forget to |
| 91 | # disable its auto-start of gpg- and ssh-agent, by issuing |
| 92 | # xfconf-query -c xfce4-session -p /startup/ssh-agent/enabled -n -t bool -s false |
| 93 | # xfconf-query -c xfce4-session -p /startup/gpg-agent/enabled -n -t bool -s false |
| 94 | # see https://docs.xfce.org/xfce/xfce4-session/advanced#ssh_and_gpg_agents |
| 95 | # also, MATE does something similar with gnome-keyring-daemon: |
| 96 | # http://william.shallum.net/random-notes/disabling-gnome-keyring-daemon-ssh-agent-on-mate-desktop |
| 97 | |
| 98 | export PATH="$HOME/.cargo/bin:$PATH" |