diff options
Diffstat (limited to 'home/modules/development/kube.nix')
-rw-r--r-- | home/modules/development/kube.nix | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/home/modules/development/kube.nix b/home/modules/development/kube.nix new file mode 100644 index 000000000000..58de4b70ed00 --- /dev/null +++ b/home/modules/development/kube.nix @@ -0,0 +1,52 @@ +{ config, lib, pkgs, ... }: +let + pkgs-unstable = import <nixpkgs-unstable> {}; + + kubie = pkgs-unstable.kubie.overrideAttrs (drv: rec { + name = "kubie-${version}"; + version = "0.8.4"; + src = pkgs.fetchFromGitHub { + rev = "v${version}"; + owner = "sbstp"; + repo = "kubie"; + sha256 = "1f82xlhhxbjadjw609kr1kdm4n69c9mqjia4b3k505wjh7cc55n0"; + }; + + cargoDeps = drv.cargoDeps.overrideAttrs (lib.const { + name = "${name}-vendor.tar.gz"; + inherit src; + outputHash = "0mish7wqwq5ynl98n6swdn5i6mg62aih5rfykbl3wx39b468n481"; + }); + }); +in +{ + home.packages = with pkgs; [ + kubectl + kubetail + sops + kubie + pkgs-unstable.argocd + ]; + + programs.zsh.shellAliases = { + "kc" = "kubectl"; + "kg" = "kc get"; + "kga" = "kc get --all-namespaces"; + "kpd" = "kubectl get pods"; + "kpa" = "kubectl get pods --all-namespaces"; + "klf" = "kubectl logs -f"; + "kdep" = "kubectl get deployments"; + "ked" = "kubectl edit deployment"; + "kpw" = "kubectl get pods -w"; + "kew" = "kubectl get events -w"; + "kdel" = "kubectl delete"; + "knw" = "kubectl get nodes -w"; + "arsy" = "argocd app sync --prune"; + }; + + home.file.".kube/kubie.yaml".text = '' + shell: zsh + prompt: + zsh_use_rps1: true + ''; +} |