@b0rk nixos-rebuild basically is your shell script on a lot of steroids. What nixos-rebuild does really nice is managing "generations". Whenever you change something about your configuration, and "switch" to it, i.e. activate it, you can then roll back to exactly what you had before (or even earlier generations) with one nixos-rebuild command.
The configuration.nix file is just the default location nixos-rebuild looks for a nix file that defines the system.
The home-manager script also has very similar capabilities by the way.