I know about nix-shell but that is limited to the shell environment. I want something that will survive a restart (I may spend a few days trying out different software for example). Preserving home directory is nice but not essential.
Very newbie question I know but I am trying to decide if NixOS is good for me and worth the learning curve.
I still don’t know the right words to search the posts so sorry if this is a repeat question.
Yeah, this should be super doable. For instance, the way I achieve this is by keeping my NixOS (and Home Manager) config in a Git repo. You can make a change to your config, commit to Git, run nixos-rebuild switch, then use it for some amount of time. If you don’t like it, you can just revert back to an earlier Git commit before you made those changes, then run nixos-rebuild switch again.
Have you used Git before? Let me know if more details would be helpful.
I think impermanance is what you are looking for. This is somethings a lot of people do to keep their machines clean. Here are some resources to look through. But take you’re time. It can be a bit daunting at first:
Maybe have a look at nixos-rebuild test too. It applies your configuration but doesn’t update your boot loader so if something’s not right you can just reboot. Doesn’t help with system state though.