summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndreas Fuchs <asf@boinkor.net>2021-11-14 22:09:01 +0100
committerAndreas Fuchs <asf@boinkor.net>2021-11-14 22:09:01 +0100
commit8a37d710fd73e17dde79012a641a85b33dfa98eb (patch)
tree913669b08d51b098292715d254dd7fe2961376b8
parent1c72fa65ed742d9bfa69cf4576b66a4c8aa6abbc (diff)
downloadnixpkgs-8a37d710fd73e17dde79012a641a85b33dfa98eb.tar
nixpkgs-8a37d710fd73e17dde79012a641a85b33dfa98eb.tar.gz
nixpkgs-8a37d710fd73e17dde79012a641a85b33dfa98eb.tar.bz2
nixpkgs-8a37d710fd73e17dde79012a641a85b33dfa98eb.tar.lz
nixpkgs-8a37d710fd73e17dde79012a641a85b33dfa98eb.tar.xz
nixpkgs-8a37d710fd73e17dde79012a641a85b33dfa98eb.tar.zst
nixpkgs-8a37d710fd73e17dde79012a641a85b33dfa98eb.zip
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.
-rw-r--r--nixos/modules/programs/zsh/zsh.nix17
1 files changed, 2 insertions, 15 deletions
diff --git a/nixos/modules/programs/zsh/zsh.nix b/nixos/modules/programs/zsh/zsh.nix
index dc6c958ca88..e5c5b08f8d4 100644
--- a/nixos/modules/programs/zsh/zsh.nix
+++ b/nixos/modules/programs/zsh/zsh.nix
@@ -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";