Impermanence after having used laptop a bit

I’ve been using my NixOS laptop a while… so I’ve probably collected a bunch of state.

I’ve been interested in the Impermanence modules for NixOS.
What’s the experience or steps to transition from a laptop running Nix for a while with it?

I think a lot is going to depend on your current disk layout and what you want to keep.

Whats your current disk partitioning scheme? Are you running a filesystem that supports snapshotting?

Can you make a backup of the data or do you want to do it “in place”?

Are you willing to tolerate broken state on your laptop?

A pathway that could work is

  1. make a backup of /home/, and maybe /etc/ with the stuff you want to keep
  2. boot into nixos via a usb
  3. reinstall nixos with impermanent disk layout
  4. apply your current configuration to your laptop with the new impermanent layout,

whatever is needed for your configuration and not defined in the config should be immediately apparent now and you can restore individual files from the backup or manually recreate them.

but if your current machine’s filesystem supports filesystem snapshotting you could take a snapshot of it now and instead of reverting back to a blank state you could revert back to state $NOW. This way you at least get forward impermanence with minimal risk of data loss.