Plans for the networkd infrastructure

Hey everyone,

I have been experimenting with the networkd infrastructure recently, and have found it to be significantly more reliable and flexible than the default script based network infrastructure. As far as I can tell, it is still considered to be experimental and is not mentioned at all in the nixos documentation. Indeed, i got started using it by reading the test.

Is there a plan for what we want to do next? There are two obvious things that I can think of:

  1. Make it easier to disable the scripting based infrastructure, and more thoroughly document how to configure things using This would allow both networkd and the script based systems to exist side by side (in nixpkgs, not on a system). I personally like the current style for because it maps onto the systemd config files very clearly, so it is easy to read the networkd manual and understand how to get what you want.

  2. Try and put the scripting infra and networkd behind a common interface. This seems quite a lot harder to me, since there is a lot of functionality in networkd which would need to be added to the scripting infra. Moreover, the current transparency of the is actually quite nice as I explained above.

I think 2 is probably a more robust solution, and I don’t really have the skills to move it forward, but if there is interest in 1. I could start working on some documentation that we could put into the nixos manual.


More or better documentation is always good, and I strongly encourage you to give it a try and recommend to get in touch with @lucperkins and the documentation team if you need guidance.

Generally I have observed that it’s more probable to feel some progress when the changes one proposes are as small and obviously beneficial as possible. At some point of course it would be cool if someone tackles the big hard problems, but we have enough small ones as it is.

1 Like

In fact, point #2 is IIRC mostly available: most of the networking.interfaces.* options work fine with systemd-networkd, you basically need to declare networking.useNetworkd = true; and in most cases it should just work.

I think one of the last blockers was the discussion about networking.useDHCP, but it got un-deprecated in nixos/networkd: reimplement useDHCP in a sensible way by lheckemann · Pull Request #167327 · NixOS/nixpkgs · GitHub.

Not sure if I forgot about something, but we should be relatively close to being able to switch over (although - well - somebody has to take care of that).

1 Like

relevant issue Switch to systemd-networkd · Issue #10001 · NixOS/nixpkgs · GitHub

1 Like