And to answer this question, rolling back the system profile using nix-env is changing the currently booted system.
On the other hand, reverting nix-channel will only make a difference if you performed a rebuild using that channel, or if you ran some nix command that uses that channel. i.e. you are simply changing the nixpkgs input, but that input needs to be consumed somehow by some nix command.
Oh, I was aware of the commands and how to run rollback, but my question is what’s the difference between nix-channel and nix-env when it comes to --rollback.
If I’m having issues with my current generation, which one should I use to rollback to a working generation?
On the other hand, reverting nix-channel will only make a difference if you performed a rebuild using that channel
So in other words, if I run sudo nixos-rebuild switch --upgrade, and I’m having issues with my current generation, should I use the nix-channel --rollback method?