I was using universal-ctags(installed as a system wide package with environment.systemPackages) for a very long time with neovim and recently installed and configured Emacs(using a home-manager). Today when I executed
ctags -R --exclude=.git
The command failed and I noticed that the binary that was being executed
readlink -f $( which ctags)
was under emacs instead of the universal-ctags.
My workaround was to make sure that universal-ctags is being listed before emacs, and in the my emacs.nix file I have added at the top of the file
home.packages = with pkgs; [
universal-ctags
];
programs.emacs = {
enable = true;
package = pkgs.emacs29;
This solved the issue for me, although I am not sure what will happen when Emacs will need to call ctags.
My question is what I done is the nix idiomatic way or just a “hack”,and what is the idiomatic way to solve such issue?
For reference here is my a link to my Emcas settings.