Hi all, I know that on nixos its aren’t important, but if I’ll destroy my disk I’ll can’t use rollbacks from grub and use nixos iso is complicated.
Exist one method for using zfs snapshots on nixos?
In theory you can manage rollbacks at boot time using ZFSBootMenu - https://docs.zfsbootmenu.org/en/v3.1.x/ . But setting it up to work with NixOS is not straightforward. Someone describes one way to do it at ZFSBootMenu on NixOS - Gridth - but their method makes it difficult to boot from an earlier NixOS generation (and has other caveats too).
I’d like to use zfsbootmenu, that I use with others distro, but I know that is difficult with nixos’s concept. I’d like to use send/receive of zfs for, i.e. when I’ll change disk or laptop. Normally I’d use rollback of old generation
You can use zfs send and receive just like you would with any other distro or indeed OS.
A few years ago, I had try to rollback from a snapshot, but after I couldn’t boot, I think there are problems from snapshot and ESP partition, because on nixos kernels are put on ESP and not on /boot partition
I think you’re holding things wrong. The nix store is already a CoW key value store, there is no need to rely on ZFS there. You may want to snapshot other things, but not the store. In fact the root can always be recreated given the store contents so that can be completely ephemeral. Thats why projects like preservation/impermenance work.