NRG Energy is buying smart home platform Vivint for $2.8 billion. Close of deal is scheduled for the first quarter of 2023.