It says on the wiki page for laptops “To enable the stock NixOS power management tool which allows for managing hibernate and suspend states you can write powerManagement.enable = true;”. Would it help save power on desktop?
It’s enabled by default, but doesn’t really do much. Maybe it did more in the past, but now the module seemingly only exists to provide hooks for other modules to hook into various power events. A stock GNOME config doesn’t seem to use any of the hooks at all.
nix-repl> x = nixos { services.displayManager.gdm.enable = true; services.desktopManager.gnome.enable = true; }
Added x.
nix-repl> x.config.powerManagement.resumeCommands
""
nix-repl> x.config.powerManagement.powerUpCommands
""
nix-repl> x.config.powerManagement.powerDownCommands
""
nix-repl> x.config.powerManagement.bootCommands
""