blob: 3a8b510a0ebb3260201d44b5313fa88445592ae6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# First global user configuration
export PATH="$HOME/.local/bin:$PATH"
if command -v nvim >/dev/null; then
export EDITOR=nvim
else
export EDITOR=vim
fi
# ct-ng configuration
export CT_PREFIX_DIR='~/.local/${CT_TARGET}'
export CT_LOCAL_TARBALLS_DIR="~/src/ct-ng"
# Meson caching
export MESON_PACKAGE_CACHE_DIR="$HOME/.cache/meson"
# Python caching
export PYTHONPYCACHEPREFIX="$HOME/.cache/pycache"
export MYPY_CACHE_DIR="$HOME/.cache/mypy"
export RUFF_CACHE_DIR="$HOME/.cache/ruff"
# Nix
for profile in "$HOME"/.nix-profile/etc/profile.d/*; do
[ -f "$profile" ] || continue
source "$profile"
done
# Guix
GUIX_PROFILE="$HOME/.config/guix/current"
! [[ -d "$GUIX_PROFILE" ]] || source "$GUIX_PROFILE/etc/profile"
GUIX_PROFILE="$HOME/.guix-profile"
! [[ -d "$GUIX_PROFILE" ]] || source "$GUIX_PROFILE/etc/profile"
unset GUIX_PROFILE
# Rest of the profile run only if login is from linux console
[[ "$(tty)" != /dev/tty* ]] && return
# Start music player daemon
pgrep mpd >/dev/null || mpd ~/.config/mpd/mpd.conf
# Start ssh-agent
eval "$(ssh-agent -s)"
# And if we are on first terminal also automatically start x server
if [ "$(tty)" = "/dev/tty1" ]; then
PROFILE_SELECTION=1
else
echo
echo "(1) sway"
echo "(2) i3"
echo -n "Select or pass to shell: "
read -r PROFILE_SELECTION
fi
if [ "$PROFILE_SELECTION" -eq 1 ]; then
exec startsway
elif [ "$PROFILE_SELECTION" -eq 2 ]; then
exec startx -- "vt$XDG_VTNR"
fi
unset PROFILE_SELECTION
|