aboutsummaryrefslogtreecommitdiff
path: root/profile
diff options
context:
space:
mode:
Diffstat (limited to 'profile')
-rw-r--r--profile23
1 files changed, 12 insertions, 11 deletions
diff --git a/profile b/profile
index 92ea6ef..e2e3407 100644
--- a/profile
+++ b/profile
@@ -9,6 +9,11 @@ export CT_LOCAL_TARBALLS_DIR="~/src/ct-ng"
# Python caching
export PYTHONPYCACHEPREFIX="$HOME/.cache/pycache"
+# Nix
+[ -f "$HOME/.nix-profile/etc/profile.d/nix.sh" ] && \
+ . "$HOME/.nix-profile/etc/profile.d/nix.sh" # added by Nix installer
+
+
# Rest of the profile run only if login is from linux console
[[ "$(tty)" != /dev/tty* ]] && return
@@ -19,18 +24,14 @@ eval "$(ssh-agent -s)"
# And if we are on first terminal also automatically start x server
if [ "$(tty)" = "/dev/tty1" ]; then
- exec startx -- vt1
+ PROFILE_SELECTION=1
+else
+ echo
+ echo "(1) i3"
+ echo "(2) sway"
+ echo -n "Select or pass to shell: "
+ read -r PROFILE_SELECTION
fi
-
-# Nix
-[ -f "$HOME/.nix-profile/etc/profile.d/nix.sh" ] && \
- . "$HOME/.nix-profile/etc/profile.d/nix.sh" # added by Nix installer
-
-echo
-echo "(1) i3"
-echo "(2) sway"
-echo -n "Select or pass to shell: "
-read -r PROFILE_SELECTION
if [ "$PROFILE_SELECTION" -eq 1 ]; then
exec startx -- "vt$XDG_VTNR"
elif [ "$PROFILE_SELECTION" -eq 2 ]; then