fish: move extra aliases to extras, add nugo function

This commit is contained in:
John Bowdre 2024-01-19 13:59:43 -06:00
parent 68c6923f11
commit 3c3dbc4e21
2 changed files with 10 additions and 6 deletions

View file

@ -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";
};
};
}

View file

@ -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";