this post was submitted on 22 Aug 2023
4 points (100.0% liked)

nixos

1245 readers
1 users here now

All about NixOS - https://nixos.org/

founded 4 years ago
 

I've been searching for a way to do this, but I haven't found anything. After I have refactored my Home Manager configuration is there a way I can test the changes in a shell before I switch?

From what I understand the next-best option is to switch, and then find and run the activate script of the previous generation to switch back.

top 1 comments
sorted by: hot top controversial new old
[–] Atemu@lemmy.ml 1 points 1 year ago

It'd be pretty neat if hm could populate a temporary directory and open a shell where $HOME is that temp dir but I don't think it can.

As for rollbacks, see https://nix-community.github.io/home-manager/index.html#sec-usage-rollbacks