mirror of
https://github.com/jbowdre/dotfiles.git
synced 2024-11-22 01:12:19 +00:00
add kubectl / make 'k' abbr conditional
This commit is contained in:
parent
e67aea353a
commit
67e83165f9
2 changed files with 9 additions and 2 deletions
|
@ -11,6 +11,7 @@
|
|||
awscli # AWS CLI
|
||||
google-cloud-sdk # GCP CLI
|
||||
hugo # Static site generator
|
||||
kubectl # Container wrangler
|
||||
nil # Nix LSP
|
||||
# nix-inspect # See which pkgs are in your Path
|
||||
nixfmt # Nix formatter
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
{ pkgs, lib, config, ... }: {
|
||||
{ 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;
|
||||
|
||||
shellAbbrs = rec {
|
||||
ccat = "egrep -v '^\s*(#|$)'";
|
||||
jqless = "jq -C | less -r";
|
||||
k = "kubectl";
|
||||
k = mkIf hasKubectl "kubectl";
|
||||
n = "nix";
|
||||
sshpass = "ssh -o PubkeyAuthentication=no";
|
||||
tf = "terraform";
|
||||
|
|
Loading…
Reference in a new issue