Hibernation & battery-life optimization on Framework 13 (AMD) running NixOS

How to enable hibernation on Framework 13 AMD AI-300 running NixOS.