nixos: zsh: Remove hack for zsh-nix-completions on nix 2.4

The zsh-nix-completions package now sets a priority, which helps avoid
conflicts with newer nix versions without patching the package from
the module.
This commit is contained in:
Andreas Fuchs 2021-11-14 22:09:01 +01:00
parent 1c72fa65ed
commit 8a37d710fd

View File

@ -283,21 +283,8 @@ in
# see https://github.com/NixOS/nixpkgs/issues/132732
environment.etc.zinputrc.text = builtins.readFile ./zinputrc;
environment.systemPackages =
let
completions =
if lib.versionAtLeast (lib.getVersion config.nix.package) "2.4pre"
then
pkgs.nix-zsh-completions.overrideAttrs
(_: {
postInstall = ''
rm $out/share/zsh/site-functions/_nix
'';
})
else pkgs.nix-zsh-completions;
in
[ pkgs.zsh ]
++ optional cfg.enableCompletion completions;
environment.systemPackages = [ pkgs.zsh ]
++ optional cfg.enableCompletion pkgs.nix-zsh-completions;
environment.pathsToLink = optional cfg.enableCompletion "/share/zsh";