You can see my configuration and installation scripts at nixos-dotfiles/deuterium at main - someonewithpc/nixos-dotfiles - Codeberg.org
I’m trying to setup NixOS in a system with a (perhaps overly) complicated partition scheme, where
- Two USBs with a FAT32 ESP and a LUKS partition which then has a RAID1 BTRFS filesystem containing keys and headers
- 8 SCSI disks formatted with LUKS that then contain a RAID5 BTRFS filesystem
I managed to get the USBs to mount and for the SCSI disks to wait and use the keys and headers, but the problem is that the root filesystem only supports one device
, rather than devices
, which means that not all cryptography setups for the disks are finished before it attempts to mount /sysroot
, in stage 1, so it fails, as seen below
I’ve tried to add
boot.initrd.systemd.targets = {
"cryptsetup" = {
after = ["usb.mount"];
};
};
but i doesn’t seem to have worked.
How can I make sure the sysroot.target
waits for all my disks? Or should I take some other approach entirely?
(I plan to attempt to make a PR for adding support for a filesystem to specify devices
, but wanted to get this working first)
PS I’ve since found the functions to properly escape systemd unit names, just haven’t pushed those changes