From 3c3dbc4e21fe4abf7c55bf4bd578c12458b3f5bd Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Fri, 19 Jan 2024 13:59:43 -0600 Subject: [PATCH] fish: move extra aliases to extras, add nugo function --- home/features/cli/extras/default.nix | 10 ++++++++++ home/features/cli/fish.nix | 6 ------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/home/features/cli/extras/default.nix b/home/features/cli/extras/default.nix index 8c36189..d31834d 100644 --- a/home/features/cli/extras/default.nix +++ b/home/features/cli/extras/default.nix @@ -21,4 +21,14 @@ trekscii # Cute startrek cli printer vault # Hashicorp vault ]; + + programs.fish = { + shellAbbrs = rec { + k = "kubectl"; + }; + + functions = { + nugo = "hugo new content/posts/$argv/index.md"; + }; + }; } \ No newline at end of file diff --git a/home/features/cli/fish.nix b/home/features/cli/fish.nix index 6251854..6ce10e3 100644 --- a/home/features/cli/fish.nix +++ b/home/features/cli/fish.nix @@ -1,9 +1,4 @@ { pkgs, lib, config, ... }: -let - inherit (lib) mkIf; - hasPackage = pname: lib.any (p: p ? pname && p.name == pname) config.home.packages; - hasKubectl = hasPackage "kubectl"; -in { programs.fish = { enable = true; @@ -17,7 +12,6 @@ in gg = "git graph"; gs = "git status"; jqless = "jq -C | less -r"; - k = mkIf hasKubectl "kubectl"; n = "nix"; sshpass = "ssh -o PubkeyAuthentication=no"; tf = "terraform";