Allow booting nixos from a subdirectory of the root device

Closes #3111