NixOS / Home-manager module
I think it would be pretty neat if the flake could also provide a NixOS module for declaring krew plugins in your NixOS config
Hi there, I'm not too familiar with writing a homemanager/nixos module but I usually do the following, after adding krewfile to the pkgs overlay for the homemanager:
{
pkgs,
lib,
...
}: let
krewfile = pkgs.writeText "krewfile" ''
modify-secret
neat
oidc-login
pv-migrate
stern
explore
get-all
node-shell
krew
'';
in {
home.activation.krew = lib.hm.dag.entryAfter ["writeBoundary"] ''
$DRY_RUN_CMD ${pkgs.krewfile}/bin/krewfile -command ${pkgs.krew}/bin/krew -file ${krewfile}
'';
}
Does that fit you?
Yes thats a good starting point for a module :)
Also thought this would be neat to configure it directly home-manager via module.
Therefore, started to add a basic module: #5
Released with https://github.com/brumhard/krewfile/releases/tag/v0.5.0