networkmanager: fix link-local ip addresses

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.

+8
+1
nixos/modules/misc/ids.nix
··· 252 gammu-smsd = 228; 253 pdnsd = 229; 254 octoprint = 230; 255 256 # When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399! 257
··· 252 gammu-smsd = 228; 253 pdnsd = 229; 254 octoprint = 230; 255 + avahi-autoipd = 231; 256 257 # When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399! 258
+5
nixos/modules/services/networking/networkmanager.nix
··· 228 users.extraUsers = [{ 229 name = "nm-openvpn"; 230 uid = config.ids.uids.nm-openvpn; 231 }]; 232 233 systemd.packages = cfg.packages;
··· 228 users.extraUsers = [{ 229 name = "nm-openvpn"; 230 uid = config.ids.uids.nm-openvpn; 231 + } 232 + { 233 + # to enable link-local connections 234 + name = "avahi-autoipd"; 235 + uid = config.ids.uids.avahi-autoipd; 236 }]; 237 238 systemd.packages = cfg.packages;
+2
pkgs/tools/networking/network-manager/default.nix
··· 20 --replace /bin/sh ${stdenv.shell} \ 21 --replace /usr/sbin/ethtool ${ethtool}/sbin/ethtool \ 22 --replace /bin/sed ${gnused}/bin/sed 23 configureFlags="$configureFlags --with-udev-dir=$out/lib/udev" 24 ''; 25
··· 20 --replace /bin/sh ${stdenv.shell} \ 21 --replace /usr/sbin/ethtool ${ethtool}/sbin/ethtool \ 22 --replace /bin/sed ${gnused}/bin/sed 23 + # to enable link-local connections 24 + substituteInPlace src/devices/nm-device.c --replace '("avahi-autoipd", NULL, NULL)' '("avahi-autoipd", &"${avahi}/sbin/avahi-autoipd", NULL)' 25 configureFlags="$configureFlags --with-udev-dir=$out/lib/udev" 26 ''; 27