nushell stuff

This commit is contained in:
Tyler Mayoff 2025-02-13 19:27:53 -05:00
parent 79681e72a2
commit a9df073b25

View file

@ -1,13 +1,30 @@
{
config,
pkgs,
lib,
...
}: {
programs.nushell = {
enable = true;
# shellAliases =
# config.home.shellAliases;
shellAliases = {
# Git
gc = "git commit";
gac = "git add . and git commit";
gacp = "gac and git push";
gs = "git status";
# nix
flake = "nix flake";
# home-manager
hm-upgrade = "nix flake update --flake ~/.local/share/chezmoi/dot_config/flake#";
hm-update = "home-manager switch --flake ~/.config/flake";
# chezmoi
dot_apply = "chezmoi apply";
dot_pull = "chezmoi update";
};
extraConfig = ''
$env.PATH = ($env.PATH | split row (char esep) | append "~/.nix-profile/bin")
@ -15,8 +32,9 @@
$env.config.show_banner = false
def gac [] { git add .; git commit }
def gacp [] { gac; git push }
def gcm [message: string] {
gc -m $"($message)"
}
use ${pkgs.nu_scripts}/share/nu_scripts/aliases/git/git-aliases.nu *
use ${pkgs.nu_scripts}/share/nu_scripts/custom-completions/git/git-completions.nu *