Modprobe error on rebuild

[dobiko@sv-minis:~/git/nixos-config]$ sudo nixos-rebuild switch --install-bootloader --flake .?submodules=1 warning: Git tree '/home/dobiko/git/nixos-config' is dirty building the system configuration... warning: Git tree '/home/dobiko/git/nixos-config' is dirty warning: download buffer is full; consider increasing the 'download-buffer-size' setting [1/78/450 built, 16/314/678 copied (1767.7/4466.1 MiB), 747.6/1413.5 MiB DL] fetching nixos-option from https://cache.n [3/146/335 built, 15/626/679 copied (3858.5/4467.1 MiB), 1334.0/1414.3 MiB DL] fetching python3.12-jinja2-3.1.5 from ht updating GRUB 2 menu... Warning: os-prober will be executed to detect other bootable partitions. Its output will be used to detect bootable binaries on them and create new boot entries. lsblk: /dev/mapper/no*[0-9]: not a block device lsblk: /dev/mapper/raid*[0-9]: not a block device lsblk: /dev/mapper/disks*[0-9]: not a block device removing obsolete file /boot/kernels/mqa47bq5p9d1sl30rils3rxa62h3nxnn-initrd-linux-6.6.72-initrd removing obsolete file /boot/kernels/wavch1xwb5ckx1kki272h0kdnrrs1sm3-initrd-linux-6.6.88-initrd installing the GRUB 2 boot loader into /boot... Installing for x86_64-efi platform. modprobe: can't change directory to '/lib/modules': No such file or directory Installation finished. No error reported.
Sorry that the output is messed up, I was using cmd

Where does the modprobe error come from?