This should allow caller to override the method to run in a container.
This is cleaner, and finally enables writing tests for the nix invoking functions.