I’ve been reading some articles regarding impermanence in NixOS, particularly this, this, this, and this, and I want to set up impermanence on my desktop system. Since it involves deleting my entire root, however, I figured I’d ask for advice here to learn what the best practices are for doing this to minimise risk of data loss, though it isn’t too critical since it’s a new setup. For reference, I have a Flake + home-manager setup on ZFS root, though I didn’t think to do a snapshot when the disk was empty since I didn’t know about impermanence when I started out. I also have separate ZFS datasets for /, /home, /nix, /var, and /var/lib. I want to set up impermanence for both root and home, with some persistent directories on home, but I’m not sure if I should set it up on both at once or if I should do root first and then home. Any advice or help is appreciated!

  • ruination@discuss.tchncs.deOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    1 year ago

    Yeah, ZFS can do it too, in fact I think that’s what Graham used in “Erase your darlings”. I’m thinking of just going the tmpfs root route, making a new dataset for /persist, and copying over the necessary files from my original root dataset, and using the impermanence module to take care of the rest of the work. That way, if I miss some files, I can just go back and copy them over from the root dataset to the persist dataset, and once I’m sure I got everything, I can just destroy the old root dataset. Would that be a good way to go about it?