Standardize lots of shell aliases
This commit is contained in:
+5
-16
@@ -1,26 +1,15 @@
|
|||||||
{ pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
programs.bash = {
|
programs.bash = {
|
||||||
enable = true;
|
enable = true;
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
acp = "rsync --progress -ah";
|
gh-personal = "$GH_CONFIG_DIR=\"${config.home.homeDirectory}/.config/gh/personal\" gh";
|
||||||
agbuild = "ansible-galaxy collection build";
|
ls = "ls --color";
|
||||||
apub = "ansible-galaxy collection publish --api-key \${GALAXY_API_KEY}";
|
ll = "ls -l --color";
|
||||||
|
|
||||||
calc = "bc";
|
calc = "bc";
|
||||||
d = "deactivate";
|
d = "deactivate";
|
||||||
devroles = "cd ~/src/ansible_collections/devroles";
|
|
||||||
gohome = "ssh greg@dns.greg-hellings.gmail.com.beta.tailscale.net -D localhost:10080";
|
|
||||||
ll = "ls -l";
|
|
||||||
molcol = "molecule -c ../../tests/molecule.yml";
|
|
||||||
packaging = "cd ~/src/packaging";
|
|
||||||
vdown = "vagrant destroy";
|
|
||||||
vhalt = "vagrant halt";
|
|
||||||
vos = "vagrant up --provision --provider openstack";
|
|
||||||
vprov = "vagrant provision";
|
|
||||||
vssh = "vagrant ssh";
|
|
||||||
vup = "vagrant up --provision --provider libvirt";
|
|
||||||
yaml2js = "python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=4)";
|
|
||||||
};
|
};
|
||||||
sessionVariables = {
|
sessionVariables = {
|
||||||
ANSIBLE_COLLECTIONS_PATH = "\${HOME}/src/";
|
ANSIBLE_COLLECTIONS_PATH = "\${HOME}/src/";
|
||||||
|
|||||||
@@ -5,25 +5,8 @@
|
|||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
programs = {
|
programs = {
|
||||||
carapace = {
|
|
||||||
enable = true;
|
|
||||||
enableNushellIntegration = true;
|
|
||||||
};
|
|
||||||
direnv = {
|
|
||||||
enable = true;
|
|
||||||
enableNushellIntegration = true;
|
|
||||||
};
|
|
||||||
nushell = {
|
nushell = {
|
||||||
enable = true;
|
enable = true;
|
||||||
environmentVariables = {
|
|
||||||
AWS_SHARED_CREDENTIALS_FILE = "/run/agenix/cache-credentials";
|
|
||||||
GOPATH = "${config.home.homeDirectory}/src/go";
|
|
||||||
GOBIN = "${config.home.homeDirectory}/src/bin";
|
|
||||||
LIBMYSQL_ENABLE_CLEARTEXT_PLUGIN = "1";
|
|
||||||
SWORD_PATH = "${config.home.homeDirectory}/.sword/";
|
|
||||||
#TIMEFORMAT = "%3Uu %3Ss %3lR %P%%";
|
|
||||||
VIRTUALENV_HOME = "${config.home.homeDirectory}/venv/";
|
|
||||||
};
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
use std/util "path add"
|
use std/util "path add"
|
||||||
path add ${config.home.homeDirectory}/src/bin
|
path add ${config.home.homeDirectory}/src/bin
|
||||||
@@ -35,9 +18,6 @@
|
|||||||
buffer_editor = lib.getExe config.programs.nixvim.package;
|
buffer_editor = lib.getExe config.programs.nixvim.package;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
starship = {
|
|
||||||
enable = true;
|
|
||||||
enableNushellIntegration = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
home.shell.enableNushellIntegration = true;
|
||||||
}
|
}
|
||||||
|
|||||||
+56
-2
@@ -1,11 +1,62 @@
|
|||||||
{ pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
|
home = {
|
||||||
|
sessionVariables = {
|
||||||
|
AWS_SHARED_CREDENTIALS_FILE = "/run/agenix/cache-credentials";
|
||||||
|
CARAPACE_BRIDGES = "zsh,bash";
|
||||||
|
EDITOR = "nvim";
|
||||||
|
GOPATH = "${config.home.homeDirectory}/src/go";
|
||||||
|
GOBIN = "${config.home.homeDirectory}/src/bin";
|
||||||
|
LIBMYSQL_ENABLE_CLEARTEXT_PLUGIN = "1";
|
||||||
|
MAVEN_OPTS = " -Dmaven.wagon.http.ssl.insecure=true";
|
||||||
|
SWORD_PATH = "${config.home.homeDirectory}/.sword/";
|
||||||
|
#TIMEFORMAT = "%3Uu %3Ss %3lR %P%%";
|
||||||
|
VIRTUALENV_HOME = "${config.home.homeDirectory}/venv/";
|
||||||
|
};
|
||||||
|
shellAliases = {
|
||||||
|
nb = "nix build -L";
|
||||||
|
nixdu = "sudo nix-store --gc --print-roots | egrep -v \"^(/nix/var|/run/\\\\w+-system|\\\\{memory|/proc)\"";
|
||||||
|
nixtest = "nixpkgs-review rev HEAD";
|
||||||
|
nixup = "nix flake lock update";
|
||||||
|
nixcopy = "nix copy --to \"s3://binary-cache/?profile=default&endpoint=nas.home%3A9000&scheme=http\"";
|
||||||
|
s = "nix run \".#runserver\"";
|
||||||
|
updateScript = "nix-shell maintainers/scripts/update.nix --argstr package";
|
||||||
|
|
||||||
|
# General
|
||||||
|
k = "kubectl";
|
||||||
|
kn = "kubectl get nodes -o wide";
|
||||||
|
kp = "kubectl get pods -o wide";
|
||||||
|
win = "sudo virsh start win10";
|
||||||
|
yaml2js = "python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=4)";
|
||||||
|
z = "zeditor .";
|
||||||
|
|
||||||
|
# Tailscale related ones
|
||||||
|
tsup = "sudo tailscale up";
|
||||||
|
tspub = "sudo tailscale up --exit-node=linode";
|
||||||
|
tshome = "sudo tailscale up --exit-node=2maccabees";
|
||||||
|
tsclear = "sudo tailscale up --exit-node=''";
|
||||||
|
|
||||||
|
# Vagrant related
|
||||||
|
vdown = "vagrant destroy";
|
||||||
|
vhalt = "vagrant halt";
|
||||||
|
vos = "vagrant up --provision --provider openstack";
|
||||||
|
vprov = "vagrant provision";
|
||||||
|
vup = "vagrant up --provision --provider libvirt";
|
||||||
|
vssh = "vagrant ssh";
|
||||||
|
};
|
||||||
|
};
|
||||||
programs = {
|
programs = {
|
||||||
|
carapace = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
direnv = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
ghostty = {
|
ghostty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = if pkgs.stdenv.hostPlatform.isDarwin then pkgs.ghostty-bin else pkgs.ghostty;
|
package = if pkgs.stdenv.hostPlatform.isDarwin then pkgs.ghostty-bin else pkgs.ghostty;
|
||||||
settings = {
|
settings = {
|
||||||
command = "~/.nix-profile/bin/xonsh";
|
command = if pkgs.stdenv.hostPlatform.isDarwin then "~/.nix-profile/bin/xonsh" else "nu";
|
||||||
font-family = "Hacker";
|
font-family = "Hacker";
|
||||||
theme = "Dracula";
|
theme = "Dracula";
|
||||||
scrollback-limit = "1000000";
|
scrollback-limit = "1000000";
|
||||||
@@ -30,5 +81,8 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
starship = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,11 +20,9 @@
|
|||||||
|
|
||||||
sessionVariables = {
|
sessionVariables = {
|
||||||
# This is for pushing builds to my local S3 cache
|
# This is for pushing builds to my local S3 cache
|
||||||
AWS_SHARED_CREDENTIALS_FILE = "/run/agenix/cache-credentials";
|
|
||||||
CARAPACE_BRIDGES = "zsh,bash";
|
CARAPACE_BRIDGES = "zsh,bash";
|
||||||
COMPLETIONS_CONFIRM = "True";
|
COMPLETIONS_CONFIRM = "True";
|
||||||
CLICOLOR = 1;
|
CLICOLOR = 1;
|
||||||
EDITOR = "nvim";
|
|
||||||
# vte_new_tab_cwd causes new Terminal tabs to open in the
|
# vte_new_tab_cwd causes new Terminal tabs to open in the
|
||||||
# same CWD as the current tab
|
# same CWD as the current tab
|
||||||
LESS_TERMCAP_mb = "\\033[01;31m"; # begin blinking
|
LESS_TERMCAP_mb = "\\033[01;31m"; # begin blinking
|
||||||
@@ -36,10 +34,8 @@
|
|||||||
LESS_TERMCAP_ue = "\\033[0m"; # end underline
|
LESS_TERMCAP_ue = "\\033[0m"; # end underline
|
||||||
LIBMYSQL_ENABLE_CLEARTEXT_PLUGIN = "1";
|
LIBMYSQL_ENABLE_CLEARTEXT_PLUGIN = "1";
|
||||||
LSCOLORS = "ExGxBxDxCxEgEdxbxgxcxd";
|
LSCOLORS = "ExGxBxDxCxEgEdxbxgxcxd";
|
||||||
MAVEN_OPTS = " -Dmaven.wagon.http.ssl.insecure=true";
|
|
||||||
OS_CLOUD = "default";
|
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} ";
|
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%%";
|
#TIMEFORMAT = "%3Uu %3Ss %3lR %P%%";
|
||||||
# Tells vox where to find virtualenvs
|
# Tells vox where to find virtualenvs
|
||||||
VIRTUALENV_HOME = "${config.home.homeDirectory}/venv/";
|
VIRTUALENV_HOME = "${config.home.homeDirectory}/venv/";
|
||||||
@@ -53,42 +49,10 @@
|
|||||||
# Python related ones
|
# Python related ones
|
||||||
ac = "vox activate";
|
ac = "vox activate";
|
||||||
d = "vox deactivate";
|
d = "vox deactivate";
|
||||||
s = "nix run \".#runserver\"";
|
|
||||||
|
|
||||||
# Nix related ones
|
|
||||||
gl-nging = "sudo nixos-container run gitlab -- systemctl restart nginx";
|
|
||||||
nb = "nix build -L";
|
|
||||||
nixdu = "sudo nix-store --gc --print-roots | egrep -v r\"^(/nix/var|/run/\\w+-system|\\{memory|/proc)\"";
|
|
||||||
nixtest = "nixpkgs-review rev HEAD";
|
|
||||||
nixup = "nix flake lock --update-input";
|
|
||||||
nixcopy = "nix copy --to \"s3://binary-cache/?profile=default&endpoint=nas.home%3A9000&scheme=http\"";
|
|
||||||
stable = "nix flake lock --update-input nixstable --update-input hm --update-input nixvimstable";
|
|
||||||
unstable = "nix flake lock --update-input nixunstable --update-input hmunstable --update-input nixvimunstable --update-input nurpkgs --update-input vsext --update-input wsl";
|
|
||||||
updateScript = "nix-shell maintainers/scripts/update.nix --argstr package";
|
|
||||||
|
|
||||||
# General
|
|
||||||
gh-personal = "$GH_CONFIG_DIR=\"${config.home.homeDirectory}/.config/gh/personal\" gh";
|
gh-personal = "$GH_CONFIG_DIR=\"${config.home.homeDirectory}/.config/gh/personal\" gh";
|
||||||
k = "kubectl";
|
|
||||||
kn = "kubectl get nodes -o wide";
|
|
||||||
kp = "kubectl get pods -o wide";
|
|
||||||
ls = "ls --color";
|
ls = "ls --color";
|
||||||
ll = "ls -l --color";
|
ll = "ls -l --color";
|
||||||
win = "sudo virsh start win10";
|
|
||||||
z = "zeditor .";
|
|
||||||
|
|
||||||
# Tailscale related ones
|
|
||||||
tsup = "sudo tailscale up";
|
|
||||||
tspub = "sudo tailscale up --exit-node=linode";
|
|
||||||
tshome = "sudo tailscale up --exit-node=2maccabees";
|
|
||||||
tsclear = "sudo tailscale up --exit-node=''";
|
|
||||||
|
|
||||||
# Vagrant related
|
|
||||||
vdown = "vagrant destroy";
|
|
||||||
vhalt = "vagrant halt";
|
|
||||||
vos = "vagrant up --provision --provider openstack";
|
|
||||||
vprov = "vagrant provision";
|
|
||||||
vup = "vagrant up --provision --provider libvirt";
|
|
||||||
vssh = "vagrant ssh";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
configHeader = builtins.readFile ./xonsh_header.xsh;
|
configHeader = builtins.readFile ./xonsh_header.xsh;
|
||||||
|
|||||||
Reference in New Issue
Block a user