Hard User Separation with NixOS
tweag.io
tweag.io
I plan to use this for testing changes to my boot units.
In theory, plain old generations allow you to safely test changes to boot units, by allowing you to jump to the previous generation. In practice, this involves remembering which generations have known-good boots.
Specialisations will allow me to run a stable and candy track, on per generation.
What other usecases do specialisations improve?
Another option is to use named profiles for this:
nixos-rebuild switch --profile-name whatever
The profile names show up in your boot menu.
In theory I could manage this with git rebasing and/or tagging, but in practice I lose confidence in whether I've accurately tracked.
With specialisations, I'd comfortably commit an experimental change to my canary track, even though it might break, safe in the knowledge that the stable track continues to boot.
Typos:
Specialisations will allow me to run a stable and canary track, one per generation.
It's candy for tinkerers.
It combined Zones, ZFS filesystems, Crossbow network virtualization, a modified X11 server, and an auth framework to glue it all together.
I don't know how widely Trusted Solaris was ever adopted, but I know that I haven't seen it in use in many years. Maybe this particular NixOS strategy will gain more traction.
Is anybody even vaguely relevant (ie. "non startup") using it in production? Right now it seems to be a plaything for developers.
Definitely more than just a developer play thing.
Beginner level blogposts (that are plenty) talk about the same few features like ad-hoc development shell.
I think it's not so much a problem of Nix/NixOS, but a consequence of the power of composability. For the next n years, people will keep discovering new things you can do. As the knowledge spreads, people will work out how to document the features and present them in ways that can be easily grasped. But the final success of NixOS will be when every distribution adopts more and more NixOS-like composability and NixOS is well understood and even boring, like the final success of Unix.
OTOH it finally got me over my fear of being a n00b and just use the source.
But I am extremely faint of heart, and I love NixOS.
The trick is that I'm not a developer, and I happen not to need to ask it to do anything complicated or non-standard. I expect lots of other people are in my position (although maybe not many of those people read HN).
Unfortunately this article is a dump of commands and configs which presents no high level picture of the solution. Just run this.