diff --git a/dot_config/flake/home/nushell.nix b/dot_config/flake/home/nushell.nix index 1c77f13..fe3198b 100644 --- a/dot_config/flake/home/nushell.nix +++ b/dot_config/flake/home/nushell.nix @@ -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 *