ashift - Requires research. this setting is device-specific, and many drives will lie.
Setup partitions
mkfs.vfat -n BOOT -F32 /dev/sdx1
parted /dev/sdx set 1 boot on
mkdir /mnt/{home,boot,nix}
zfs create -o encryption=on -o keyformat=passphrase zroot/locker
zfs create zroot/locker/home
zfs create zroot/locker/nix
zfs create zroot/locker/os
mount -t zfs zroot/locker/os /mnt
mount -t zfs zroot/locker/home /mnt/home
mount -t zfs zroot/locker/nix /mnt/nix
mount /dev/sdx1 /mnt/boot
NixOS config
{# needed for zfs. 4 random bytes (in hex)networking.hostId="12345678";# or nicer implementationnetworking.hostId=builtins.substring08(builtins.hashString"md5"config.networking.hostName);# nixos documentation recommends setting these to falseboot={zfs.forceImportAll=false;zfs.forceImportRoot=false;};}
unmount and export all zfs stuff before leaving the live installer!!!
Some questions I have in my mind (and possibly others') are:
are these from your nixos-generate-config call? If not, how did you discover them and add those to the generated hardware.nix?
how do we know whether to include the modules in boot.initrd. (stage 1) or the boot.kernelModules?
were there any reasons to add them in availableKernelModules instead of kernelModules. I have a feeling that this is a silly question, you can ignore this question..