Issues with building and running Raspberry 4 image

Hello - I am very new to NixOs and maybe it is an obvious issue but I can’t get round it and it drives me crazy.

I am trying to do the initial build of RPI4 images which I downloaded from here - Hydra - Job nixos:trunk-combined:nixos.sd_image_raspberrypi4.aarch64-linux

I burned it to the SD card, edited cmdline.txt file and added the following line:
console=ttyS0,115200n8 console=ttyAMA0,115200n8 console=tty0

so I could connect to RPI console with serial cable.

so far all good - I am able to connect to nixos promt with nixos account.

next step I added /etc/nixos/configuration.nix which looks like this:

{ config, pkgs, … }:
{
imports =
[
];

boot.loader.grub.enable = false;
boot.loader.generic-extlinux-compatible.enable = true;
boot.kernelPackages = pkgs.linuxPackages_latest;

fileSystems = {
“/boot” = {
device = “/dev/disk/by-label/NIXOS_BOOT”;
fsType = “vfat”;
};
“/” = {
device = “/dev/disk/by-label/NIXOS_SD”;
fsType = “ext4”;
};
};
environment.systemPackages = with pkgs; [
wget vim
];

services.openssh.enable = true;
system.stateVersion = “20.03”; # Did you read the comment?
}

and run nixos-rebuild switch.

the build fails and drops me into emergency mode which shows that ‘The process /run/current-system/sw/bin/plymouth could not be executed’

ok - found this issue https://github.com/NixOS/nixpkgs/issues/23050

which seems to suggest that the issue is related to not mounted /boot partion?

not sure why - I can see /boot with df -h /boot which points to “/dev/disk/by-label/NIXOS_BOOT”; just as specified by the configuration.nix

adding option
options = [“nofail”];

to /boot partition and rebuilding takes me further but then none of the options which I add to configuration.nix or add interactively hold after the restart.

e.g even if I add password for nixos account with passwd and even though I have

services.openssh.enable = true;

in the configuration.nix file

sshd doesn’t work after restart and OS prompt says that ‘nixos’ account has an empty password.

all this feels like the issue with boot partition but I have no idea how to confirm this or fix it.

does anybody has any experience with running NixOs on RPI4?

this page raspberrypi :: Lunar Computer — Tech Blog and Tutorials has some instructions but they are pretty basic and I have the same issue with running the first build