So because I had problems with nixos 17.03 (kodi) for now I wanted to
rollback to a older version and get rid of the newer generations on my
system, so that I can update my 16.10 profile with other configurations.

Doing something like that:

nix-env -G 198 -p /nix/var/nix/profiles/system
nix-env --delete-generations 199 200... -p /nix/var/nix/profiles/system
nix-collect-garbage

The first question is why do I need to specify a path and use a nix tool
when I want to make nixos system rollback?  searching this path always is not
very funny.

Why cant I use some sort of nixos-env --delete-generations without a
path? And why cant I use like with nix-channel not 198 as parameter to
rollback instead of using switch + delete manually?

then I wanted to change back the channel so that upgrades I do with
nixos-rebuild would use 16.10 packages.

I thought using --add 16.10-url and then --update would be the way to
go, but I see there is also a rollback option. So lets try it:

/ssh:root@PC: $ nix-env --list-generations
  18   2017-05-12 04:04:24   
  19   2017-05-12 17:09:26   (current)
/ssh:root@PC: $ nix-channel --rollback
switching from generation 19 to 18
/ssh:root@PC: $ nix-env --list-generations
  18   2017-05-12 04:04:24   
  19   2017-05-12 17:09:26   (current)
/ssh:root@PC: $ nix-channel --list
nixos https://nixos.org/channels/nixos-17.03

It seems to me that it did nothing.

Why is there a second rollback feature? When would be a good time to use
it, and a new add+update be not doing the same?

Stefan

_______________________________________________
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to