I’ve heard the government can give you a grant to help out and if you generate surplus electricty you can sell it to power companies. Is this true?

(may be broke/outdated!)
I’ve heard the government can give you a grant to help out and if you generate surplus electricty you can sell it to power companies. Is this true?