Using Nix vs dotfiles to configure applications

My current NixOS configuration uses home manager to copy my various dotfiles into place. These are all stored in the same git configuration. Obviously many applications have Nix options which can be used to configure things in the same way, but currently I am failing to see any advantage to using them. If I continue using dotfiles I have the benefit of portability with other distros and generally more widely available documentation, as well as access to all the options.

Am I missing something though? Is there a specific benefit to, say, configuring Neovim directly with Nix rather than with a vimrc/Lua?

This’ll mostly be an opinion thing, I think.

IMO: not really. If you aren’t 100% bought in or still need to use the settings on non-nix systems, porting them in may also waste effort.

If the module is comprehensive, I guess there’s an argument that you ~get type/option checking which may shake some bugs and option renames out of your configs if the program lacks tooling for this.

There’s probably also an argument, in cases where there’s some synthesis between programs or where you can configure which executables the program will delegate some task to, that having config in Nix will make it easier to stitch them together or do things like substitute in a nix-managed version of something without needing to have it on PATH.

I generally only fold these in on a case-by-case basis when there’s a clear reason/benefit.

That makes sense—thanks for the response.