Commit | Line | Data |
---|---|---|
ca3a844a 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. | |
1fb89b32 AB |
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 | |
ca3a844a AB |
10 | |
11 | # source host-specific profile | |
12 | if [ -f "$HOME/.config/profiles/$(hostname)" ]; then | |
13 | . "$HOME/.config/profiles/$(hostname)" | |
14 | fi | |
15 | ||
16 | export EDITOR="emacsclient -nw" | |
17 | export VISUAL="emcl" | |
23748328 | 18 | export GPG_TTY=$(tty) |
ca3a844a | 19 | |
52b7a57a | 20 | PATH="$HOME/.cabal/bin:$HOME/.cargo/bin:$HOME/.elan/bin:$PATH" |
ca3a844a AB |
21 | if [ -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" | |
25 | fi | |
26 | export PATH | |
27 | export INFOPATH | |
28 | ||
29 | export MY_GUIX_MANIFESTS="$HOME/.config/guix/manifest" | |
30 | export MY_GUIX_PROFILES="$HOME/.config/guix/profile" | |
31 | ||
32 | export XDG_CONFIG_HOME="$HOME/.config" | |
33 | export XDG_DATA_HOME="$HOME/.local/share" | |
34 | ||
35 | if [ -f "$HOME/.config/user-dirs.dirs" ]; then | |
36 | set -a | |
37 | . "$HOME/.config/user-dirs.dirs" | |
38 | set +a | |
39 | fi | |
40 | ||
41 | export INPUTRC="$XDG_CONFIG_HOME"/readline/inputrc | |
42 | export SCREENRC="$XDG_CONFIG_HOME"/screen/screenrc | |
43 | ||
44 | export MAILDIR="$HOME/mail" | |
45 | export CVS_RSH="ssh" | |
46 | ||
47 | if [ -x "$(command -v go)" ]; then | |
461f4ab2 | 48 | export GOPATH="$HOME/s/go" |
ca3a844a AB |
49 | export PATH="$GOPATH/bin:$PATH" |
50 | fi | |
51 | ||
9867e4bb AB |
52 | export _JAVA_AWT_WM_NONREPARENTING=1 |
53 | export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true' | |
54 | #export MOZ_USE_XINPUT2=1 # precise scrolling in firefox | |
55 | ||
ca3a844a AB |
56 | # if running bash |
57 | if [ -n "$BASH_VERSION" ]; then | |
58 | # include .bashrc if it exists | |
59 | if [ -f "$HOME/.bashrc" ]; then | |
60 | . "$HOME/.bashrc" | |
61 | fi | |
62 | fi | |
63 | ||
64 | if [ -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 | |
78 | fi | |
79 | ||
80 | for 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 | |
87 | done | |
88 | ||
5fc03b0d | 89 | export PATH="$HOME/u/local/bin:$HOME/.local/bin:$PATH" |
ca3a844a AB |
90 | |
91 | # start an ssh-agent (with guix's openssh) | |
92 | if [ -z "$IS_GUIX_SYSTEM" ]; then | |
93 | if ! pgrep -u "$USER" ssh-agent > /dev/null; then | |
461f4ab2 | 94 | rm -f ~/.ssh-agent-thing |
ca3a844a AB |
95 | ssh-agent > ~/.ssh-agent-thing |
96 | fi | |
97 | if [[ ! "$SSH_AUTH_SOCK" ]]; then | |
98 | eval "$(<~/.ssh-agent-thing)" | |
99 | fi | |
100 | fi | |
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 |