NixOS (or rather nixpkgs) in its current state heavily depends on GitHub/Microsoft at the very least, and switching to anything else is non-trivial.
As a normal NixOS user, I know how to do this. It would be quite some effort, but not especially difficult. Additionally, for a government they have the servers to set up a build farm.