NixNet: Declare Your Network Experiments as a Nix Flake
Reproducibility is a cornerstone of scientific research — results that cannot be reproduced cannot be trusted, challenged, or built upon. Yet in network research, reproducing an experiment is harder than it should be: undeclared dependencies, environment drift, and fragile shell scripts cause experiments to silently diverge across machines and over time, making it difficult to verify prior work or share experiments with collaborators.
NixNet is a recent effort that uses Nix to manage the complete lifecycle of virtual network experiments: dependency installation, topology setup, experiment execution, and resource cleanup — all triggered by a single nix run command. It is already in use across research, industry, and teaching at TU Munich and Airbus, and we also presented NixNet at the IRTF Applied Networking Research Workshop (ANRW) in Vienna in July 2026.
A NixNet experiment is defined by a Nix expression specifying network nodes, virtual Ethernet links, link characteristics (delay, loss, bandwidth via netem), and per-node application scripts. NixNet compiles this into a human-readable Bash script that sets up a strongly isolated environment using nested Linux namespaces: each node gets its own network stack, and mount namespaces ensure nodes can only access explicitly declared resources — no host state leaks in, no experiment state leaks out. The full dependency closure — userspace binaries, libraries, other file resources, even custom eBPF programs — is pinned and reproducible from source via the nix build system.
In this talk, I want to give deeper insights into the inner workings of NixNet than the ANRW paper does: how the NixOS module system is used to model network topologies, my experience using Nix for real research projects, and the practical lessons learned from building research tooling on Nix — from pitfalls in network experimentation such as DNS leaking out of namespaces, to declaratively pinning forked and patched network tools. I'll also cover how experiments are distributed on systems with Nix and on machines without it, and compare NixNet with the state of the art in virtual network testbeds — outperforming Docker-based tools in setup time and memory consumption.
I'm looking forward to discussing this with the Nix community — there are open questions around Nix's own versioning guarantees, packaging patterns for research software, macOS support, and how the ecosystem can better support reproducible science.
NixNet is open source (MIT/Apache 2.0):
github.com/birneee/nixnet
nixnet.org
Benedikt Spies is a PhD student and network researcher at the Technical University of Munich, working on secure network protocol development with a focus on QUIC and WebAssembly. He has been using Nix since 2021 and teaching it since 2026.
since 2022 - Network Researcher and PhD Student @ Technical University of Munich
2022 - M.Sc. - Computer Science @ Technical University of Munich
2022 - B.Sc. - Computer Science @ Landshut University of Applied Sciences
2015 - Computer Science Expert for Software Development (CCI Germany)