Resolving conflicts nix-2.4 & nix-zsh-completion

How can I deal with this conflict?

$ darwin-rebuild switch --flake .
warning: Git tree '/Users/ahmed/.dotfiles' is dirty
building the system configuration...
warning: Git tree '/Users/ahmed/.dotfiles' is dirty
error: builder for '/nix/store/2hmj6wly5vn216zhwd4kwhzwzayn0fjj-system-path.drv' failed with exit code 25;
       last 1 log lines:
       > error: collision between `/nix/store/csadkv9vsi64sxx8nq08ydy88j3b3kwp-nix-2.4/share/zsh/site-functions/_nix' and `/nix/store/9aggbz1bcndl0la8b42y4ridwp7wgvwq-nix-zsh-completions-0.4.4/share/zsh/site-functions/_nix'
       For full logs, run 'nix log /nix/store/2hmj6wly5vn216zhwd4kwhzwzayn0fjj-system-path.drv'.
error: 1 dependencies of derivation '/nix/store/18df8zf7cw737d9qqbhh3n8hs7gbpvlv-darwin-system-21.11.20211109.f096b71+darwin4.44da835.drv' failed to build

The result of nix log /nix/store/2hmj6wly5vn216zhwd4kwhzwzayn0fjj-system-path.drv is just this

error: collision between `/nix/store/csadkv9vsi64sxx8nq08ydy88j3b3kwp-nix-2.4/share/zsh/site-functions/_nix' and `/nix/store/9aggbz1bcndl0la8b42y4ridwp7wgvwq-nix-zsh-completions-0.4.4/share/zsh/site-functions/_nix'

So it’s not really that helpful.

Managed to fix it from this thread nix-2.4 conflicts with programs.zsh.enable · Issue #5445 · NixOS/nix · GitHub

1 Like