2022-11-10 10:54:22 -06:00
|
|
|
# vim: set ft=python:
|
2023-05-10 16:49:06 -05:00
|
|
|
from os import getcwd, uname
|
|
|
|
|
from pathlib import Path
|
2023-06-01 10:54:46 -05:00
|
|
|
from sys import platform
|
2023-05-10 16:49:06 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
#if uname().sysname == 'Darwin' and ('__NIX_DARWIN_SET_ENVIRONMENT_DONE' not in ${...} or not $__NIX_DARWIN_SET_ENVIRONMENT_DONE):
|
|
|
|
|
# source-bash /etc/bashrc
|
2022-11-10 10:54:22 -06:00
|
|
|
|
|
|
|
|
# set -e == $RAISE_SUBPROC_ERROR = True
|
|
|
|
|
# set -x == trace on; $XONSH_TRACE_SUBPROC = True
|
|
|
|
|
# $? == _.rtn
|
|
|
|
|
|
|
|
|
|
xontrib load direnv
|
2023-05-29 18:50:48 -05:00
|
|
|
xontrib load coreutils
|
2024-08-16 17:29:11 -05:00
|
|
|
xontrib load xonsh-apipenv
|
2022-11-10 10:54:22 -06:00
|
|
|
|
|
|
|
|
# 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
|
2023-05-10 16:49:06 -05:00
|
|
|
$PATH.insert(0, Path("~/.nix-profile/bin").expanduser())
|
|
|
|
|
$PATH.insert(0, Path("~/src/bin").expanduser())
|
|
|
|
|
$PATH.insert(0, Path("~/.local/bin").expanduser())
|
2023-06-01 10:54:46 -05:00
|
|
|
|
|
|
|
|
if platform == "darwin":
|
|
|
|
|
$PATH.append(Path("/opt/homebrew/bin/"))
|
2023-06-06 12:23:06 -05:00
|
|
|
$PATH.append(Path("/run/current-system/sw/bin"))
|
|
|
|
|
$PATH.append(Path("/nix/var/nix/profiles/default/bin"))
|
2023-06-12 11:09:10 -05:00
|
|
|
$PATH.append(Path("/usr/local/bin"))
|