NixOS/nixpkgs — pull request #3961 by wkennington (2014-09-04 01:29:16+00:00)
Title: nixos/install-grub: Read correct mountpoints

Currently, install-grub uses `df -T` to determine which mount point refers to the given file. The problem is that df reads from /proc/mounts, which includes mount points from outside the nixos-install chroot. Therefore, the install-grub procedure will fail during a nixos-install on the livecd since it will incorrectly determine that /nix/store is mounted on a unionfs.

To remedy this behavior, we check /proc/self/mountinfo which is a sanitized listing for the current environment.