NixOS/nixpkgs — pull request #4244 by abbradar (2014-09-24 01:42:31+00:00)
Title: Replace resumeDevice with autodetection of hibernation partition

This new implementation automagically finds resume partition from all enabled swap partitions. It, therefore, workarounds Linux kernel's problem of having no way to find out which of all enabled swap partitions or devices was used as a resume one. It doesn't cover a case when user has a swap file because we can't specify resume offset not from the kernel command line; user should use boot.kernelParams for that for now.

This covers all old use cases of resumeDevice, because a resumeDevice should be in swapDevices by definition, and extends it by providing out-of-the-box hibernate support and supporting multiple swap devices; so I've removed old configuration option.

Tested on my machine with one swap partition; would be good to have a test with multiple partitions, but I can't see what can go wrong.