This reverts commit c25907d072.
I think this commit broke the NixOS service for NetworkManager. At least
with this, and the two previous reverts, everything is back to normal.
(With multiple-outputs split, it would have reduced the closure size by
3 MiB.)
NM upstream has a hardcoded path to /usr/bin/ping.
This patch changes:
- ping/ping6 are now from the nix store
- we no longer try to make substitutions on a missing file
- we use file from the nix store
NetworkManager needs an additional avahi-user to use link-local
IPv4 (and probably IPv6) addresses. avahi-autoipd also needs to be
patched to the right path.
The most complex problems were from dealing with switches reverted in
the meantime (gcc5, gmp6, ncurses6).
It's likely that darwin is (still) broken nontrivially.
Fixes #7593 (NM can't find the dnsmasq binary); the NM expression is missing
dnsmasq in its buildInputs, so configure can't find it.
Also creates /var/lib/misc which dnsmasq expects to exist, because it puts
dnsmasq.leases there.
I think this makes sense, because now all the plugins will be gnome3 gtk3
based, the same way nm-applet is.
I also removed networkmanager_pptp_gnome variation of networkmanager_pptp
package, because i think no variation is needed and gnome support should
be on by default like in other packages.
There are two fixes in this commit.
Firstly, I am creating proper symlinks for the Alias= definitions in the
.service files. This achieves the same result as `systemctl enable`, and
I think is preferred over `mv`.
Secondly, `networkmanager-init` now wants `NetworkManager.service`,
along with `ModemManager.service`. ModemManager does not depend on
NetworkManager (according to `systemctl list-dependencies ModemManager`),
thus NetworkManager never got started on boot.
Without this the openconnect VPN plugin doesn't work:
NetworkManager[830]: <warn> VPN connection 'Foo VPN' failed to connect: 'Could not find openconnect binary.'.
Rename NetworkManager-dispatcher.service to
dbus-org.freedesktop.nm-dispatcher.service so it is found by systemd (NixOS
doesn't handle the Alias directive in the unit file)