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