Wait for udev after resizing partitions

Otherwise the EC2 boot may panic.

Changed files
+4 -1
nixos
modules
virtualisation
+4 -1
nixos/modules/virtualisation/amazon-grow-partition.nix
···
'';
boot.initrd.postDeviceCommands = ''
-
[ -e /dev/xvda ] && [ -e /dev/xvda1 ] && TMPDIR=/run sh $(type -P growpart) /dev/xvda 1
+
if [ -e /dev/xvda ] && [ -e /dev/xvda1 ]; then
+
TMPDIR=/run sh $(type -P growpart) /dev/xvda 1
+
udevadm settle
+
fi
'';
};