Skip to content

Makes kubectl plug-ins from the Krew repository accessible to Nix

Notifications You must be signed in to change notification settings

eigengrau/krew2nix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

krew2nix

TL/DR:

environment.systemPackages =
  [ kubectl.withKrewPlugins (plugins: [ plugins.node-shell ]) ];

Examples

devShell

{
  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
  inputs.flake-utils.url = "github:numtide/flake-utils";
  inputs.krew2nix.url = "github:eigengrau/krew2nix";
  inputs.krew2nix.inputs.nixpkgs.follows = "nixpkgs";

  outputs = { self, nixpkgs, flake-utils, krew2nix, ... }:
    flake-utils.lib.eachDefaultSystem (system: let
      pkgs = nixpkgs.legacyPackages.${system};
      kubectl = krew2nix.packages.${system}.kubectl;
    in {
      devShell = pkgs.mkShell {
        nativeBuildInputs = [ pkgs.bashInteractive ];
        buildInputs = [
          pkgs.k9s
          pkgs.kubernetes-helm
          (kubectl.withKrewPlugins (plugins: [
            plugins.node-shell
          ]))
        ];
      };
    });
}

Enter with nix develop.

About

Makes kubectl plug-ins from the Krew repository accessible to Nix

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages