mirror of
https://github.com/jbowdre/dotfiles.git
synced 2024-11-25 18:42: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
|
awscli # AWS CLI
|
||||||
google-cloud-sdk # GCP CLI
|
google-cloud-sdk # GCP CLI
|
||||||
hugo # Static site generator
|
hugo # Static site generator
|
||||||
|
kubectl # Container wrangler
|
||||||
nil # Nix LSP
|
nil # Nix LSP
|
||||||
# nix-inspect # See which pkgs are in your Path
|
# nix-inspect # See which pkgs are in your Path
|
||||||
nixfmt # Nix formatter
|
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 = {
|
programs.fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
shellAbbrs = rec {
|
shellAbbrs = rec {
|
||||||
ccat = "egrep -v '^\s*(#|$)'";
|
ccat = "egrep -v '^\s*(#|$)'";
|
||||||
jqless = "jq -C | less -r";
|
jqless = "jq -C | less -r";
|
||||||
k = "kubectl";
|
k = mkIf hasKubectl "kubectl";
|
||||||
n = "nix";
|
n = "nix";
|
||||||
sshpass = "ssh -o PubkeyAuthentication=no";
|
sshpass = "ssh -o PubkeyAuthentication=no";
|
||||||
tf = "terraform";
|
tf = "terraform";
|
||||||
|
|
Loading…
Reference in a new issue