diff options
-rwxr-xr-x | zprofile | 2 | ||||
-rwxr-xr-x | zscripts/nixshell.zsh | 4 |
2 files changed, 3 insertions, 3 deletions
@@ -55,4 +55,4 @@ mkdir -p "$(dirname "$ZHISTFILE")" source "$ZDOTDIR/profiles/zprofile.$HOST" 2>/dev/null # Source additional host-specific profiles # Autostart X after login -[ -z $DISPLAY ] && [[ $UID != 0 ]] && [[ $TTY =~ /dev/tty(1|C0) ]] && startx "$X11CONFIG/xinitrc" +[ -z $DISPLAY ] && [[ $UID != 0 ]] && [[ $TTY =~ /dev/tty(1|C0) ]] && command -v startx &> /dev/null && startx "$X11CONFIG/xinitrc" diff --git a/zscripts/nixshell.zsh b/zscripts/nixshell.zsh index 16d0ee3..de5e65a 100755 --- a/zscripts/nixshell.zsh +++ b/zscripts/nixshell.zsh @@ -16,9 +16,9 @@ fi function nix-shell-py() { if [ ! -f ./requirements.txt ]; then echo "No requirements.txt file was found in the current directory. Exiting..." 1>&2 - exit 1 + return 1 fi requirements="$(sed 's/#.*//;s/^/python3Packages./' ./requirements.txt | tr -s '\n' ' ')" - nix-shell -p ${=requirements} + nix-shell -p ${=requirements} $@ } |