Howdy! I recently wrote up a guide on installing NixOS on the PiBox, a RaspberryPi Compute Module 4 enclosure which comes with a PWM fan, an LCD, and two SATA SSD bays.
The guide walks through how to configure LUKS and ZFS along with installing NixOS. It also includes support for the hardware peripherals and packages the systemd services to manage them! The implementation for the hardware specifics can be found in this repo for anyone curious.
Hope it’s useful!