What’s your best practice / tip to solve merge conflicts in flake.lock?
I’d always accept one side and run nix flake lock again, most of the time it works, but sometimes it has problems with missing lockfile entries and also I might discard lockfile changes of the other side that were important in some way.
I’m glad I never had to resolve conflicts in flake.lock files, only in other package manager’s, so my experience might not directly translate.
The problem is, that both diffs contain the edits necessary to change file A to file B. When edits differ, accepting any version might solve the problem, but the worst thing that can happen is that accepting a change to a hash of one file might be on top of a non-conflicting reordering edit in both diffs. This would lead to changing the hash of a different package.
Also, selectively applying diffs from two revisions might cause transitive dependencies to fail. You will want to either apply all changes manually or stick with your way of re-creating the lock file from scratch, then test thoroughly if everything still works as expected before committing/pushing.