First of all, thank you for making NixOS on WSL a reality! It works!
Originally, NixOS comes with a handy rollback feature which helps in case the system got broken. At the current (974a7c4) state it's even easier: making some systemd service enter a failed state prevents the login. Though, there is a workaround wsl -u nixos for exact this case with some nasty hacks following it related to namespaces, but I think the problem is clear.
The idea is to develop a not so complex NixOS module or maybe patch the grub/systemd-boot/extlinux module to allow a user select the system configuration to load instead of the most recent.
Without NixOS module, in the most primitive form: listing directories symlinks in /nix/var/nix/profiles and waiting for a user to type the desired one should suffice, residing in syschdemd.sh script.
First of all, thank you for making NixOS on WSL a reality! It works!
Originally, NixOS comes with a handy rollback feature which helps in case the system got broken. At the current (974a7c4) state it's even easier: making some systemd service enter a failed state prevents the login. Though, there is a workaround
wsl -u nixosfor exact this case with some nasty hacks following it related to namespaces, but I think the problem is clear.The idea is to develop a not so complex NixOS module or maybe patch the grub/systemd-boot/extlinux module to allow a user select the system configuration to load instead of the most recent.
Without NixOS module, in the most primitive form: listing directories symlinks in
/nix/var/nix/profilesand waiting for a user to type the desired one should suffice, residing insyschdemd.shscript.