On Tue, 9 Jul 2024 at 18:02, Simon McVittie <s...@debian.org> wrote: > > On Tue, 09 Jul 2024 at 16:21:16 +0200, Ansgar 🙀 wrote: > > On Tue, 2024-07-09 at 22:44 +0900, Simon Richter wrote: > > > I believe NM does not have a fixed configuration format, but only a dbus > > > API. > > > > It's perfectly fine to edit configuration files for NM manually, see > > man:nm-settings-keyfile(5). > > ... and debian-installer already knows how to write out these files, > and has done so for more than a decade if I'm reading correctly. This is > not a recent innovation, and anyone who has installed our default desktop > environment in the last few years - especially if they used wifi during > installation - has been relying on this code path. > > <https://salsa.debian.org/installer-team/netcfg/> is responsible > for converting the network configuration that was used temporarily in > the d-i environment into a NM configuration file if NM is installed, > or an ifupdown configuration otherwise. Writing the equivalents into > /etc/systemd/network for systemd-networkd would presumably not be rocket > science, it's a simple .ini-like syntax similar to the one NM uses.
It is indeed quite simple: https://salsa.debian.org/installer-team/netcfg/-/merge_requests/11 And I think you are perfectly right: for the simple, default use case, we want something that is not downstream-only and dependent on a single overworked maintainer, and that is modern enough to know that Netlink exists and cannot be ignored. It's not 1998 anymore, even the simplest systems need to take it into account, and there are distro-agnostic solutions that everyone can rely on with minimal integration efforts. I think it's fine to add support for netplan, in fact it should be merged first in the installer and my MR builds on top of it, and there are many cases where it is a good idea to use it, but it should not be the default, for the same reason as above - only Ubuntu really uses it, and it does happen that Canonical's priorities shift. The default logic in the above MR, absent specific choices, is: if netplan is installed it will be used (needs to be preseeded or installed manually, so it works for the cloud case), if network-manager is installed it will be used (perfect for the desktop/GUI case), if the interface is wired and it's on Linux and systemd is init networkd will be used (perfect for minimal installations/servers), else it goes back to the current ifupdown. The main obvious advantage of networkd is that it is already installed and will always be already installed in the default case, it's just disabled, so the extra cost is one ini file and a couple of symlinks, so the footprint of the minimal working install goes down. When ifupdown loses prio: important then the footprint will actually decrease. Those who want complex cases can manually pick netplan. Those who want to relive the thrills of the late 90s can pick ifupdown and write all the crappy scripts they like, and spend their own time wondering why eth0 became eth1 or viceversa and everything stopped working. The default is the smallest and most sensible option. Everybody wins.