The @nixos_org integration tests have always been a fantastic tool - We just made them even faster and much simpler to run! 🚀 By adding a new lightweight container backend to the test driver, you can now run your suites on standard, non-KVM VMs. 👇

Here is what the new container backend brings to your NixOS workflow:

⚡ Blazing Fast Execution: How fast? Booting two machines, letting them ping each other, and tearing them down now takes ~3 seconds!
💸 Run Anywhere (Cheaper!): You no longer need bare-metal KVM-enabled hosts. Your tests can now run seamlessly on cheap, standard VMs.
🎮 GPU Testing Support: Hardware acceleration is now accessible. You can finally test GPU-dependent workloads directly inside your integration tests!

Curious how it works under the hood and how to enable it in your projects? Dive into our latest article and try it out for yourself!

🔗 Read the full breakdown here: https://nixcademy.com/posts/faster-cheaper-nixos-integration-tests-with-containers/

#NixOS #DevOps #Testing #Linux #Nix #InfrastructureAsCode #CI #Containers

@jgalowicz @nixos_org

Oh my! I had the thought floating around my head why we don't simply use namespaces for all tests except the ones that test the kernel specifically. Well, I know the answer now; very cool to see this!

@Atemu @nixos_org yeah building a private POC and building something that is upstreamable are two very different things!

@jgalowicz @nixos_org

Oh absolutely! I didn't even build a PoC; merely a theoretical "could this even work in theory" test in my head. Turns out I'd even written a small issue about it: https://github.com/NixOS/nixpkgs/issues/350899

Big kudos to you!

Use containers for NixOS tests? · Issue #350899 · NixOS/nixpkgs

Issue description So this just occurred to me: Why do we use VMs to run NixOS tests when we could (in theory) start ourself a systemd with NixOS inside of a namespace? nixos-containers via systemd-...

GitHub