Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.

ZSH Completions for Nix and NixOS

This project aims to provide a highly complete set of ZSH completions for Nix, NixOS, NixOps, and the surrounding ecosystem.


Setting programs.zsh.enable = true in /etc/nixos/configuration.nix will automatically install and enable nix-zsh-compeletions.

Oh-My-ZSH Installation

cd ~/.oh-my-zsh/custom/plugins
git clone

Then add nix-zsh-completions to the plugins list in ~/.zshrc

If you want your prompt to be prefixed by [nix-shell] when you're in a nix-shell add this to your zshrc:


Antigen Installation

Add the following to ~/.zshrc

antigen bundle

Plain ZSH Installation

Clone this repository and add the following to ~/.zshrc with the path to nix-zsh-completions updated as necessary.

source $HOME/nix-zsh-completions/nix-zsh-completions.plugin.zsh
fpath=($HOME/nix-zsh-completions $fpath)
autoload -U compinit && compinit

Required ZSH version

The completion scripts are known to be broken in ZSH version 5.0.8 or older, 5.2 or newer works.

ZSH Completions Tutorial


You can’t perform that action at this time.