Ok, maybe I haven't been following this as much as I should.
What I do know is that Spacex is a private company that does contract work for NASA.
Somebody else will have to finish answering your question from there.
It’s all government money, contracted to Space X. Much like most of DoD.