From 24d55a33e87d6863dad356d74f387a9903ef26c7 Mon Sep 17 00:00:00 2001 From: wi11-holdsworth <83637728+wi11-holdsworth@users.noreply.github.com> Date: Fri, 16 Jan 2026 07:58:32 +1100 Subject: [PATCH] feat(shell-aliases): break out to separate module to ensure aliases can be used over all shells --- modules/home-manager/default.nix | 1 + modules/home-manager/features/fish.nix | 25 ----------------- .../home-manager/features/shell-aliases.nix | 27 +++++++++++++++++++ 3 files changed, 28 insertions(+), 25 deletions(-) create mode 100644 modules/home-manager/features/shell-aliases.nix diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index 2bd1c85..797b6e2 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -15,6 +15,7 @@ "gh" "git" "lazygit" + "shell-aliases" "starship" "yazi" "zoxide" diff --git a/modules/home-manager/features/fish.nix b/modules/home-manager/features/fish.nix index a3fdf4c..4c8e865 100644 --- a/modules/home-manager/features/fish.nix +++ b/modules/home-manager/features/fish.nix @@ -9,31 +9,6 @@ interactiveShellInit = '' set fish_greeting ''; - shellAliases = { - # keep-sorted start - ",cat" = "bat"; - ",curl" = "xh"; - ",cut" = "choose"; - ",df" = "duf"; - ",diff" = "delta"; - ",du" = "dua"; - ",find" = "fd"; - ",grep" = "rga"; - ",ping" = "gping"; - ",ps" = "procs"; - ",sed" = "sd"; - ",ss" = "snitch"; - ",top" = "btm"; - ",unzip" = "ripunzip"; - "g" = "lazygit"; - "l" = "eza"; - "la" = "eza -a"; - "ls" = "eza"; - "ns" = "nh os switch"; - "vi" = "nvim"; - "vim" = "nvim"; - # keep-sorted end - }; plugins = [ # INFO: Using this to get shell completion for programs added to the path through nix+direnv. # Issue to upstream into direnv:Add commentMore actions diff --git a/modules/home-manager/features/shell-aliases.nix b/modules/home-manager/features/shell-aliases.nix new file mode 100644 index 0000000..0c78ca6 --- /dev/null +++ b/modules/home-manager/features/shell-aliases.nix @@ -0,0 +1,27 @@ +{ + home.shellAliases = { + # keep-sorted start + ",cat" = "bat"; + ",curl" = "xh"; + ",cut" = "choose"; + ",df" = "duf"; + ",diff" = "delta"; + ",du" = "dua"; + ",find" = "fd"; + ",grep" = "rga"; + ",ping" = "gping"; + ",ps" = "procs"; + ",sed" = "sd"; + ",ss" = "snitch"; + ",top" = "btm"; + ",unzip" = "ripunzip"; + "g" = "lazygit"; + "l" = "eza"; + "la" = "eza -a"; + "ls" = "eza"; + "ns" = "nh os switch"; + "vi" = "nvim"; + "vim" = "nvim"; + # keep-sorted end + }; +}