diff --git a/pkgs/applications/networking/cluster/talosctl/default.nix b/pkgs/applications/networking/cluster/talosctl/default.nix index e9202205ea9a..675bbe2ca7fa 100644 --- a/pkgs/applications/networking/cluster/talosctl/default.nix +++ b/pkgs/applications/networking/cluster/talosctl/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitHub }: +{ lib, buildGoModule, fetchFromGitHub, installShellFiles }: buildGoModule rec { pname = "talosctl"; @@ -33,6 +33,15 @@ buildGoModule rec { subPackages = [ "cmd/talosctl" ]; + nativeBuildInputs = [ installShellFiles ]; + + postInstall = '' + installShellCompletion --cmd talosctl \ + --bash <($out/bin/talosctl completion bash) \ + --fish <($out/bin/talosctl completion fish) \ + --zsh <($out/bin/talosctl completion zsh) + ''; + doCheck = false; meta = with lib; {