Docker - switch // overlay / overlay2 FS lead to emergency console

i’m pretty new to nixos and made my first steps.
I’d installed nixos and wanted to enable docker;

  virtualisation.docker.enable = true;
  #virtualisation.docker.storageDriver = "overlay2";

which leaded after reboot to this error:
overlayfs lower directory not found.

i believe and maybe someone can assist me - that a nixos-generate-config creates the following entry which is not intended by the docker daemon

#  fileSystems."/var/lib/docker/overlay2/2759d93183010abe2e39e0516af98bb1d5cb5bdef11dc4460170c096d48e5873/merged" =
#    { device = "overlay";
#      fsType = "overlay";
#    };

which leaded to a fstab entry and then finaly into emergency console.

By deactivating this overlayfs entry in hardware-config the boot does work as expected.
Is this possible a side-effect of the generation - and should there be a warning in combination with docker? maybe ignore overlay-fs entry in a whole? a bug?

thanks for sharing your wisdom with me

This post saved my day today. Unfortunately I also do now know how the entry in the hardware-configuration got there but I at least removing it got my system running again.

I would also gues it is a bug though. Maybe running nixos generate-config adds this entry from a running container instance which leads to the error when on boot nixos tries to mount a location that does not exist anymore?

Will investigate. This is the first time I experienced this error even though I have been using NixOS and docker for a while. However I only have today with this machine left and I am pretty happy that it is running again for now. Will keep you updated