Flakes boot on Nixos

This happens to me after installing a flakes configuration on Nixos by installing from the NixOS Gnome graphical image choosing “no desktop”. Can anybody help me?

Looks like you don’t have the right kernel modules in initrd for your drive. Did you generate the hardware-configuration.nix on the device or copy it from somewhere else?

1 Like

How to generate the hardware-configuration.nix correctly? Don’t do that step, I think that’s the problem.

1 Like
❯ cat /etc/nixos/hardware-configuration.nix
# Do not modify this file!  It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations.  Please make changes
# to /etc/nixos/configuration.nix instead.
...

Depending on your setup, the contents of this file might be sufficient.

Otherwise, I recommend looking into nixos-generate-config.

1 Like