#
# Dotfiles specifics for Termux instances, which force hostname to localhost.
#

# Use a much abbreviated prompt.
$PROMPT = "{BOLD_BLUE}{cwd}{RESET}{RED}{last_return_code_if_nonzero:[{BOLD_INTENSE_RED}{}{RED}] }{RESET}{BOLD_BLUE}{prompt_end}{RESET} "

# Set our XKB directory.
$XKB_CONFIG_DIR = $HOME + "/.nix-profile/share/X11/xkb"

# Add things to our path.
PATH_ADDS = [
  "/nix/var/nix/profiles/default/bin/",
  $HOME + "/.nix-profile/bin"
]

$DISPLAY=":0"
$PULSE_SERVER="tcp:127.0.0.1:4713"

try_source("includes/add-ssh-keys.xsh")
try_source("includes/nixos.xsh")

aliases['rebuild'] = "nix-on-droid --flake '~/dotfiles#design'"
del aliases['cd']

$XDG_DATA_DIRS = [
  "/usr/share",
  "/usr/local/share",
  $HOME + "/.nix-profile/share"
]

# Make sure cd isn't run as a subprocess.
# Gods help us that this is necessary.
import xonsh.tools
aliases['cd'] = xonsh.tools.unthreadable(xonsh.dirstack.cd)

