target_groups was renamed to static_configs in d459916504 ("prometheus service: rename values to match prometheus 1.0 naming."). Catch up.
This is based on @benleys work: https://github.com/NixOS/nixpkgs/pull/8216 I updated changed the user and group ids.