(cherry picked from commit c035046999)
c035046999
Unfortunately this duplicates some code from NixOS but it does allow much more flexibility and, hopefully, stability in the Home Manager documentation. Fixes #254.