modules/dev-tools: compile kubectl completions on build time
This commit is contained in:
parent
3745999877
commit
da4b186419
1 changed files with 5 additions and 1 deletions
|
@ -2,6 +2,10 @@
|
|||
|
||||
let
|
||||
cfg = config.local.programs.dev-tools;
|
||||
|
||||
kubectlCompletionsZsh = pkgs.runCommand "kubectl-completion.zsh" {} ''
|
||||
${lib.getExe pkgs.kubectl} completion zsh > $out
|
||||
'';
|
||||
in
|
||||
{
|
||||
options.local.programs.dev-tools = with lib; {
|
||||
|
@ -98,7 +102,7 @@ in
|
|||
];
|
||||
|
||||
programs.zsh.initExtra = ''
|
||||
source <(kubectl completion zsh)
|
||||
source ${kubectlCompletionsZsh}
|
||||
'';
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue