Just as a note, there was this talk at the Fosdem and I think it adds some bits I had missed (mostly because I don' t know nodejs) http://ftp.osuosl.org/pub/fosdem/2017/K.4.601/deploying_npm_packages_with_nix.vp8.webm