From 609ae23f2a60785136a42a4c10f2c829757464db Mon Sep 17 00:00:00 2001 From: Tyler Kelley Date: Wed, 19 Feb 2025 17:33:28 -0600 Subject: [PATCH] Add aliases to zsh and keybindings --- modules/home/zsh.nix | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/modules/home/zsh.nix b/modules/home/zsh.nix index af2acd0..81997a0 100644 --- a/modules/home/zsh.nix +++ b/modules/home/zsh.nix @@ -1,7 +1,26 @@ -{...}: { +{profile, ...}: { programs.zsh = { enable = true; autosuggestion.enable = true; syntaxHighlighting.enable = true; + + initExtra = '' + bindkey "^J" up-line-or-history + bindkey "^K" down-line-or-history + ''; + + shellAliases = { + sv = "sudo nvim"; + v = "nvim"; + fr = "nh os switch --hostname ${profile}"; + fu = "nh os switch --hostname ${profile} --update"; + zu = "sh <(curl -L https://gitlab.com/Zaney/zaneyos/-/raw/main/install-zaneyos.sh)"; + ncg = "nix-collect-garbage --delete-old && sudo nix-collect-garbage -d && sudo /run/current-system/bin/switch-to-configuration boot"; + cat = "bat"; + man = "batman"; + ls = "eza --icons -a --group-directories-first -1"; + ll = "eza --icons -a --group-directories-first -1 --no-user --long"; + tree = "eza --icons --tree --group-directories-first"; + }; }; }