I’ve been running NixOS with encrypted ZFS on this Laptop for a while now without issues. I tried updating to NixOS 25.11 today, and booting from my ZFS root now seems to fail. I am still asked for the passphrase and after entering it, I get the following error:
filesystem 'rpool/nixos/root' cannot be mounted using 'mount'.
Use 'zfs set mountpoint=legacy' or 'zfs mount rpool/nixos/root'.
See zfs(8) for more information.
It looks less like an actual issue with ZFS and possibly more like using the wrong tool for doing the mount?
My NixOS configuration is here: https://github.com/polygon/dotfiles
The most relevant files for this machine (nixbrett) should in this folder: https://github.com/polygon/dotfiles/tree/master/systems/nixbrett
The ZPOOL was created like so:
2025-11-03.16:26:12 zpool create -o ashift=12 -o autotrim=on -R /mnt -O acltype=posixacl -O canmount=off -O compression=zstd -O dnodesize=auto -O normalization=formD -O relatime=on -O xattr=sa -O mountpoint=/ -f rpool /dev/disk/by-id/nvme-SAMSUNG_MZVLC2T0HBLD-00BLL_S7SFNF0Y713564-part2
2025-11-03.16:26:40 zfs create -o canmount=off -o mountpoint=none -o encryption=on -o keylocation=prompt -o keyformat=passphrase rpool/nixos
2025-11-03.16:26:47 zfs create -o canmount=on -o mountpoint=/ rpool/nixos/root
2025-11-03.16:26:51 zfs create -o canmount=on -o mountpoint=/home rpool/nixos/home
2025-11-03.16:26:59 zfs create -o canmount=off -o mountpoint=/var rpool/nixos/var
2025-11-03.16:27:04 zfs create -o canmount=on rpool/nixos/var/lib
2025-11-03.16:27:12 zfs create -o canmount=on rpool/nixos/var/log
2025-11-03.16:27:26 zfs create -o canmount=off -o mountpoint=/nix rpool/nixos/nix
2025-11-03.16:27:31 zfs create -o canmount=on rpool/nixos/nix/store
I’ve been running a similar configuration for years on a previous Laptop and it’s quite surprising that it falls apart now. Anyone knows what might be wrong here?