Automation of systemd module updates?

Currently, all systemd modules are updated manually. This means the systemd modules can lag quite a bit beind systemd itself. For example, the ForceDHCPv6PDOtherInformation option in the DHCPv6 section has been removed since at least feb 2022 yet it is still present in the networkd module in sept 2022 while no attempts are being (as of writing) made to address this. There are also many examples of configuration field deletions, renames (which causes confusions among people reading systemd man pages) and additions (which prevents people from using newer features) not being reflected on NixOS systemd modules in time.

All of this reduces the UX of systemd modules, even though there has been a lot of manpower put into keeping those modules updated, so what can we do about it? Automation. Interestingly the man pages of systemd is actually relatively structured (written in xml) so maybe we can write a program to parse it every time systemd updates, compare it with the systemd modules and update the modules accordingly. One issue still remains is that the man pages, while structured, does not contain any type information and, as such, needs to be complemented with human input. But again, there might be other places to get those type information such as the gperf file.

Anyways, I think we should definitely explore ways to automate systemd module updates.

I am not sure what a good migration path would be. Maybe we can add something similar to how nixos already handles removed options but for systemd units? This would mean users would be informed that one setting no longer exists or is deprecated and have a good way to migrate.

Also automation can probably aid in finding added/removed settings but I would leave out the part of automatically updating it due to its complexity for now.