Closed oneingan closed 1 year ago
Ok, after some investigation I've discovered main reason because boot.initrd.systemd
is not working. My zfs was not restoring to blank after reboot. This is because configuration:
boot.initrd.postDeviceCommands = lib.mkAfter ''
zfs rollback -r rpool/local/root@blank
''
was being ignored. As i have not found a initrd.systemd
equivalent I migrated to root on tpmfs
and everything is working well again.
I think you'd just create a oneshot service that the initrd systemd would execute, but tmpfs also works!
For anyone looking for a solution There's one for zfs and for btrfs Thank to the awesome people who found the exact solution 🫡 https://discourse.nixos.org/t/impermanence-vs-systemd-initrd-w-tpm-unlocking/25167/2
If
boot.initrd.systemd.enable = true;
in 22.11 then systemd unit mounts fail with:I guess because
local-fs.target
is included ininitrd
, creating the files previous to stage2 boot. The existent files are empty.Directories mount units are working ok.
I tried to exclude
persist--
failed units usingboot.initrd.systemd.suppressedUnits
but without luck.