This keeps it in line with the NixOS one.
This is basically the same thing as the NixOS module, except for NIX_PATH handling [1]. [1]: https://github.com/nix-community/home-manager/pull/2677