Nix function to merge attributes / records recursively and concatenate arrays

You might be interested in infuse, which can do this (and many other things) without dragging in the whole module system.