Files
nixos/home/modules/baseline/xonsh.nix
T

73 lines
2.5 KiB
Nix
Raw Normal View History

2022-08-02 01:50:50 -05:00
{ pkgs, config, lib, ... }:
2022-04-29 10:58:31 -05:00
2022-08-02 01:50:50 -05:00
{
2022-04-29 10:58:31 -05:00
programs.xonsh = {
enable = true;
sessionVariables = {
CLICOLOR = 1;
2024-08-13 23:25:46 -05:00
EDITOR = "nvim";
2022-04-29 10:58:31 -05:00
# vte_new_tab_cwd causes new Terminal tabs to open in the
# same CWD as the current tab
LESS_TERMCAP_mb = "\\033[01;31m"; # begin blinking
LESS_TERMCAP_md = "\\033[01;31m"; # begin bold
LESS_TERMCAP_me = "\\033[0m"; # end mode
LESS_TERMCAP_so = "\\033[01;44;36m"; # begin standout-mode (bottom of screen)
LESS_TERMCAP_se = "\\033[0m"; # end standout-mode
LESS_TERMCAP_us = "\\033[00;36m"; # begin underline
LESS_TERMCAP_ue = "\\033[0m"; # end underline
2024-06-12 10:45:43 -05:00
LIBMYSQL_ENABLE_CLEARTEXT_PLUGIN = "1";
LSCOLORS = "ExGxBxDxCxEgEdxbxgxcxd";
MAVEN_OPTS = " -Dmaven.wagon.http.ssl.insecure=true";
OS_CLOUD = "default";
PROMPT = "{vte_new_tab_cwd}{env_name}{BOLD_GREEN}{user}@{hostname}{BOLD_BLUE} {short_cwd}{branch_color}{curr_branch: {}}{RESET} {BOLD_BLUE}{prompt_end}{RESET} ";
SWORD_PATH = "${config.home.homeDirectory}/.sword/";
TIMEFORMAT = "%3Uu %3Ss %3lR %P%%";
# Tells vox where to find virtualenvs
VIRTUALENV_HOME = "${config.home.homeDirectory}/venv/";
2024-08-13 23:25:46 -05:00
XONSH_COLOR_STYLE = "default";
2022-11-07 13:52:53 -06:00
GOPATH = "${config.home.homeDirectory}/src/go";
GOBIN = "${config.home.homeDirectory}/src/bin";
2022-04-29 10:58:31 -05:00
};
aliases = {
2024-08-20 22:43:31 -05:00
# Python related ones
2022-04-29 10:58:31 -05:00
ac = "vox activate";
d = "vox deactivate";
2024-08-20 22:43:31 -05:00
# Nix related ones
2024-07-22 17:46:02 -05:00
gl-nging = "sudo nixos-container run gitlab -- systemctl restart nginx";
2022-11-10 08:22:42 -06:00
nixup = "nix flake lock --update-input";
2024-08-04 20:25:35 -05:00
nixtest = "nixpkgs-review rev HEAD";
2024-08-20 22:43:31 -05:00
nixdu = "sudo nix-store --gc --print-roots | egrep -v r\"^(/nix/var|/run/\\w+-system|\\{memory|/proc)\"";
# General
gh-personal = "$GH_CONFIG_DIR=\"${config.home.homeDirectory}/.config/gh/personal\" gh";
ls = "ls --color";
ll = "ls -l --color";
2024-01-17 12:34:10 -06:00
tf = "terraform";
2024-08-20 22:43:31 -05:00
# Tailscale related ones
2022-06-12 00:50:26 -05:00
tsup = "sudo tailscale up";
tspub = "sudo tailscale up --exit-node=linode";
2022-06-13 16:14:41 +00:00
tshome = "sudo tailscale up --exit-node=2maccabees";
2022-06-12 00:56:46 -05:00
tsclear = "sudo tailscale up --exit-node=''";
2024-08-20 22:43:31 -05:00
# Vagrant related
2022-09-27 11:04:50 -05:00
vdown = "vagrant destroy";
vhalt = "vagrant halt";
vos = "vagrant up --provision --provider openstack";
vprov = "vagrant provision";
vup = "vagrant up --provision --provider libvirt";
vssh = "vagrant ssh";
2022-04-29 10:58:31 -05:00
};
2022-11-10 10:54:22 -06:00
configHeader = builtins.readFile ./xonsh_header.xsh;
2024-01-16 23:02:05 -06:00
configFooter = (builtins.readFile ./xonsh_footer.xsh) + (builtins.concatStringsSep "\n" [
"with open('${pkgs.stdenv.cc}/nix-support/dynamic-linker', 'r') as fp:"
" $NIX_LD = fp.read().strip()"
]);
2022-04-29 10:58:31 -05:00
};
}