Hard user separation with NixOS
If you use the same computer in different contexts, let’s say for work and for your private life, you may wish to install two different operating systems to protect your private life data from mistakes or hacks from your work. For instance a cryptolocker you got from a compromised work email won’t lock out your family photos.
But then you have two different operating systems to manage, and you may consider that it’s not worth the effort and simply use the same operating system for your private life and for work, at the cost of the security you desired.
I offer you a third alternative, a single NixOS managing two securely separated contexts. You choose your context at boot time, and you can configure both context from either of them.
Source: Hard user separation with NixOS, an article by Solène Rapenne.