Just copy the file and source it in your .bashrc or .zshrc.
mkdir -p ~/.bash_completions.d
wget -q -O - github.com/msbatarce/nx_completion/raw/master/nx_completion.bash >> ~/.bash_completions.d/nx
echo ". ~/.bash_completions.d/nx" >> ~/.bashrc