Understand the NixOS Container rewrite (RFC 0108)
masterRFC 0108 proposes replacing the legacy nixos-container subsystem with a new implementation based on systemd-nspawn(5) and systemd-networkd(8).
Key improvements include:
- Reliable Networking: Uses
systemd-networkdto ensure network uplinks are available immediately during container boot, preventing services (likenextcloud-setup.serviceorclamav) from hanging due to missing connectivity. - Standardized Configuration: Moves away from ad-hoc CLI flags in favor of using native
.nspawnunits defined via Nix expressions. This allows for easier overrides and support for advanced features likeIPVLAN. - Improved Tooling: Replaces the custom Perl-based
nixos-container.plwith a Python implementation and leveragesmachinectl(1)for standard operations like starting, stopping, and logging into containers.