LVM raid not existing on boot

I am diving into nixos fully for the first time and am setting up my system for the first time. My setup is as default minimal as possible right now apart from trying to setup lvm raid1. Currently when booting the system hangs trying to mount /dev/raidpool/home to /home.

I have 2 HDD (4tb each) on /dev/sda and /dev/sdb

Here are the exact steps I took to setup my system.

# fdisk /dev/sda
# fdisk /dev/sdb
    // new, primary, Linux LVM 
# pvcreate /dev/sda1
# pvcreate /dev/sdb1
# vgcreate raidpool /dev/sda1 /dev/sdb1
# modprobe dm_raid
# lvcreate --type raid1 -m 1 -l 100%FREE -n home raidpool
# mkfs.ext4 /dev/raidpool/home

And how I modified my /etc/nixos/configuration.nix adding:

boot.initrd.kernelModules = [
    "dm-raid"
];
fileSystems.”/home" = {
    device = "/dev/raidpool/home";
    fsType = "ext4";
}; 

After a reboot the system fails to mount this device stating:

Timed Out Waiting for device /dev/raidpool/home
Dependency failed for File System Check on /dev/raidpool/home
Dependency failed for /home
Dependency failed for Local File System

This then drops me into the emergency shell, when ls /dev the directory does not have raidpool.

Running vgchange -ay remounts the system.

I am on nixos version 24.11, brand new.

Do forgive me for anything missing, I am typing on my phone

I tried adding in the following lines to my configuration file to no success based on other threads I found:

boot.initrd.preDeviceCommands = "vgchange -ay";
boot.initrd.preLVMCommands = "lvm vgchange -ay"; 

I’m thinking that using mdadm to create and manage the raid might be a better way to go after looking things up, as it’s simple of a use case. I am thinking about adding in my old SSD after I transfer old data around to use as a cache, which I believe would need me to use lvm for that and I still worry this issue would come up.

So, I decided to not continue with LVM for my raid 1 backup, instead opting to use mdadm, I would still like to understand why this is happening for LVM, as I still like the idea of adding back in my SSD for caching (or if I opt to use another nvme).

To get my system to run the way I wanted I did the following:

# mdadm --create /dev/md1 --level=mirror --raid-devices=2 /dev/sda1 /dev/sdb1
# mkfs.ext4 /dev/md1

Then I did a reboot (/dev/md1 will get renamed), after which I got my raid1 device checked with:

# mdadm -D /dev/md/och:1

and amended my hardware config adding in:

fileSystems."/home" = {
  device = "/dev/md/och:1";
  fsType = "ext4";
};