Xonsh glow-ups

Move xonsh header/footer to separate files
Add gregpy as the default Python version used in xonsh
Add Nix profile to PATH in xonsh ahead of tmux path mangling to allow
python3 with modules to be discovered
This commit is contained in:
Greg Hellings
2022-11-10 10:54:22 -06:00
parent 7c9450f60b
commit d1344fa2bd
5 changed files with 101 additions and 96 deletions
+17
View File
@@ -0,0 +1,17 @@
# vim: set ft=python:
if '__NIX_DARWIN_SET_ENVIRONMENT_DONE' not in ${...} or not $__NIX_DARWIN_SET_ENVIRONMENT_DONE:
source-bash /etc/bashrc
# set -e == $RAISE_SUBPROC_ERROR = True
# set -x == trace on; $XONSH_TRACE_SUBPROC = True
# $? == _.rtn
import os
xontrib load direnv
# Insert to the front, because when we spawn xonsh in tmux we have raw python3
# paths added before these. That ends up screwing with finding the python3 version
# with all of our dependencies that we want
$PATH.insert(0, "${config.home.homeDirectory}/.nix-profile/bin")
$PATH.insert(0, "${config.home.homeDirectory}/src/bin")