New rules will encourage UK consumers to generate and store their own power, ministers say.