On 2025-12-01 the Asterinas RFC-0002, titled Asterinas NixOS, was approved.
Asterinas is an operating system kernel written in Rust, using framekernel architecture, aiming for full Linux compatibility at the syscall level. So far Asterinas has been very researchy, providing only partial Linux compatibility and no easy way to daily drive.
There is a Getting Started guide that explains how to run Asterinas NixOS in a QEMU VM.
By the release of Asterinas NixOS, this framekernel now has a distro based on NixOS where the Linux kernel is replaced by Asterinas. The RFC goes in-depth with why NixOS was chosen, but the NixOS community can probably already guess: as a kernel developer, overrides and overlays provide extensibility without forking an existing distro and maintaining a distro fork (only the patches), and reproducing bugs is particularly easy because of pinning.
Disclaimer: Asterinas is an independent, community-led project. Asterinas NixOS is not an official NixOS project and has no affiliation with the NixOS Foundation. No sponsorship or endorsement is implied.
I always personally believed that NixOS is a perfect FRAMEWORK for experimenting. Along with the reasons u mentioned , there’s VMs etc can be spawned from the config etc to test. I’m excited to see how this grows
Does the kernel implement enough syscalls to run nix itself natively (don’t know how hard derivation builder sandboxing would be to get running for example)? We are making use of quite a few kernel facilities and try to benefit from newish syscalls when supported. I wonder just how much it takes from the kernel side to get something working.
there’s VMs etc can be spawned from the config etc to test
Yes, running VMs is easy once you set it up, but I would give most of the credit to libvirt.
Does the kernel implement enough syscalls to run nix itself natively (…)?
I think the answer is clearly yes, but I don’t understand the question completely.
There is a Linux compatibility checklist with some emojis that indicate degree of compatiblity. It links to a syscall flag coverage section of the documentation every time there’s something either not supported or supported but somehow doesn’t do anything. There are plenty of s in that list, plenty of s indicating silently ignoring things or actively not supporting things. Supported file systems doesn’t list ext4 yet, only ext2. And so on. It’s still under massive development. I count 18 PRs in the last week (merged or opened). So compared to Linux it’s still tiny, but very much alive and progressing.
This is really great!! I’ve long thought NixOS — as the most flexible distro or distro-builder — should be a huge benefit to people developing new Operating Systems / Kernels. It’s really great to see that finally happening!
IMO. NixOS is a real framework for how linux should have been.
Infact it is just a framework which leverages Nix. This creates flexibility, modularity and declarative reliability to let users experiment various new linux tech safely and reliably. There was also a cachyOS kernel based project in the nix community. Cachy is a custom kernel who also wanted to optimize the packages for that particular kernel. Now to implement this cool idea the only non-NixOS frameowrk in linux is to create a new distro and maintain it (they chose arch as their base).
But with nixos it’s just some changes in lines of code are enough, like changing the kernel package, separate input channel(repo) for their package, dont trust their cache? u can go like gentoo to build without substituter. The flexibility flex goes on. I really wish many new linux takes nixos framework and create new era of declarative linux distros.
For anyone who wants to try it: just follow their tutorial in Getting Started - The Asterinas Book. There are two points that need to be made clear:
Their installation iso is still normal NixOS, with Linux kernel instead of asterinas kernel. You need to install it.
Their ext2 implementation is very unstable, and large-scale writes (such as pull derivation) can easily cause kernel panic and break the filesystem. I don’t know if there is a better configuration to avoid this. So with anything you want to test, pray for some luck, and make a backup of disk image.