Change:
After nixos-rebuild switch, the network-manager service goes down and immediately segfaults every time it tries to come up again. journalctl for the segfault message or something, anyway, at this point I don't have working network anymore. nixos 17.09pre104870.
Specifically it segfaults because returns a non-zero exit status (saying "No for interface NetworkManager"); the segfault itself appears fixes in their HEAD. I haven't checked whether that makes it actually work, yet, but maybe we could arrange for it to have a in the meantime, whatever that means.
In which commit it was fixed?
Does this also happen in 17.03?
Happens with both the 17.03 tag and the 17.03 channel. Looks like cherry-picking the above commit as a patch for our network-manager lets it work correctly, btw.
also fixed in 17.03:

Discussion:
{ stdenv, lib, fetchFromGitHub, pkgconfig, cmake <del> , dbus, networkmanager, spidermonkey_1_8_5 }: </del> <ins> , dbus, networkmanager, webkitgtk214x, pcre, python2 }: </ins> stdenv.mkDerivation rec { name = "libproxy-${version}";

nativeBuildInputs = [ pkgconfig cmake ]; <del> buildInputs = [ dbus networkmanager spidermonkey_1_8_5 ]; </del> <ins> buildInputs = [ dbus networkmanager webkitgtk214x pcre ]; cmakeFlags = [ "-DWITH_WEBKIT3=ON" "-DWITH_MOZJS=OFF" "-DPYTHON_SITEPKG_DIR=$(out)/${python2.sitePackages}" ]; </ins> meta = with stdenv.lib; { platforms = platforms.linux;

{ stdenv, fetchurl, intltool, pkgconfig, libglade, networkmanager, gnome3 , libnotify, libsecret, polkit, isocodes, modemmanager, librsvg , mobile_broadband_provider_info, glib_networking, gsettings_desktop_schemas <del> , makeWrapper, udev, libgudev, hicolor_icon_theme, jansson, wrapGAppsHook }: </del> <ins> , makeWrapper, udev, libgudev, hicolor_icon_theme, jansson, wrapGAppsHook, webkitgtk }: </ins> stdenv.mkDerivation rec { <del> name    = "${pname}-${version}"; </del> <ins> name    = "${pname}-${major}.${minor}"; </ins> pname   = "network-manager-applet"; <del> version = networkmanager.version; </del> <ins> major   = "1.4"; minor   = "6"; </ins> src = fetchurl { <del> url    = "mirror://gnome/sources/${pname}/${networkmanager.major}/${name}.tar.xz"; sha256 = "09ijxicsqf39y6h8kwbfjyljfbqkkx4vrpyfn6gfg1h9mvp4cf39"; </del> <ins> url    = "mirror://gnome/sources/${pname}/${major}/${name}.tar.xz"; sha256 = "0xpcdwqmnwiqqqsd5rx1gh5rvv5m2skj59bqxhccy1k2ikzgr9hh"; </ins> }; configureFlags = [ "--sysconfdir=/etc" ];

buildInputs = [ gnome3.gtk libglade networkmanager libnotify libsecret gsettings_desktop_schemas polkit isocodes makeWrapper udev libgudev gnome3.gconf gnome3.libgnome_keyring <del> modemmanager jansson librsvg glib_networking gnome3.dconf </del> <ins> modemmanager jansson librsvg glib_networking gnome3.dconf webkitgtk </ins> ]; nativeBuildInputs = [ intltool pkgconfig wrapGAppsHook ];

<del> diff --git a/src/ppp-manager/nm-ppp-manager.c b/src/ppp-manager/nm-ppp-manager.c index 89a7add..ae99eb4 100644 --- a/src/ppp-manager/nm-ppp-manager.c +++ b/src/ppp-manager/nm-ppp-manager.c @@ -843,7 +843,7 @@ create_pppd_cmd_line (NMPPPManager *self, </del> <ins> --- NetworkManager-1.6.2.org/src/ppp/nm-ppp-manager.c	2017-02-15 13:10:27.000000000 +0100 +++ NetworkManager-1.6.2/./src/ppp/nm-ppp-manager.c	2017-04-03 11:45:39.891653216 +0200 @@ -724,7 +724,7 @@ </ins> g_return_val_if_fail (setting != NULL, NULL);

, systemd, libgudev, libnl, libuuid, polkit, gnutls, ppp, dhcp, iptables , libgcrypt, dnsmasq, bluez5, readline , gobjectIntrospection, modemmanager, openresolv, libndp, newt, libsoup <del> , ethtool, gnused, coreutils, file, inetutils, kmod }: </del> <ins> , ethtool, iputils, gnused, coreutils, file, inetutils, kmod, jansson, libxslt , python3Packages, docbook_xsl, fetchpatch }: </ins> stdenv.mkDerivation rec { name    = "network-manager-${version}"; pname   = "NetworkManager"; <del> major   = "1.4"; version = "${major}.4"; </del> <ins> major   = "1.6"; version = "${major}.2"; </ins> src = fetchurl { url    = "mirror://gnome/sources/${pname}/${major}/${pname}-${version}.tar.xz"; <del> sha256 = "029k2f1arx1m5hppmr778i9yg34jj68nmji3i89qs06c33rpi4w2"; </del> <ins> sha256 = "1y96k82rav8if334jl500zc024d210c4pgprh94yqyz3rmanyaxj"; </ins> }; outputs = [ "out" "dev" ]; <ins> postPatch = '' patchShebangs ./tools ''; </ins> preConfigure = '' substituteInPlace configure --replace /usr/bin/uname ${coreutils}/bin/uname substituteInPlace configure --replace /usr/bin/file ${file}/bin/file <del> substituteInPlace src/devices/nm-device.c --replace /usr/bin/ping ${inetutils}/bin/ping </del> <ins> substituteInPlace src/devices/nm-device.c  --replace /usr/bin/ping ${inetutils}/bin/ping  --replace /usr/bin/ping6 ${inetutils}/bin/ping substituteInPlace src/devices/nm-arping-manager.c  --replace '("arping", NULL, NULL);' '("arping", "${inetutils}/bin/arping", NULL);' </ins> substituteInPlace src/NetworkManagerUtils.c --replace /sbin/modprobe ${kmod}/bin/modprobe substituteInPlace data/84-nm-drivers.rules  --replace /bin/sh ${stdenv.shell}

"--with-libsoup=yes" ]; <del> patches = [ ./PppdPath.patch ]; </del> <ins> patches = [ ./PppdPath.patch (fetchpatch { sha256 = "1n90j5rwg97xkrhlldyr92filc2dmycl9pr0svky9hlcn9csk2z6"; name = "null-dereference.patch"; url = "https://github.com/NetworkManager/NetworkManager/commit/4e8eddd100bbc8429806a70620c90b72cfd29cb1.patch"; }) ]; </ins> buildInputs = [ systemd libgudev libnl libuuid polkit ppp libndp <del> bluez5 dnsmasq gobjectIntrospection modemmanager readline newt libsoup ]; </del> <ins> bluez5 dnsmasq gobjectIntrospection modemmanager readline newt libsoup jansson ]; </ins> <del> propagatedBuildInputs = [ dbus_glib gnutls libgcrypt ]; </del> <ins> propagatedBuildInputs = [ dbus_glib gnutls libgcrypt python3Packages.pygobject3 ]; </ins> <del> nativeBuildInputs = [ intltool pkgconfig ]; </del> <ins> nativeBuildInputs = [ intltool pkgconfig libxslt docbook_xsl ]; </ins> preInstall = '' installFlagsArray=( "sysconfdir=$out/etc" "localstatedir=$out/var" "runstatedir=$out/var/run" )

substituteInPlace $out/etc/dbus-1/system.d/org.freedesktop.NetworkManager.conf --replace 'at_console="true"' 'group="networkmanager"' # rename to network-manager to be in style <del> mv $out/etc/systemd/system/NetworkManager.service $out/etc/systemd/system/network-manager.service </del> <ins> mv $out/etc/systemd/system/NetworkManager.service $out/etc/systemd/system/network-manager.service </ins> # systemd in NixOS doesn't use `systemctl enable`, so we need to establish # aliases ourselves.

stdenv.mkDerivation rec { name    = "${pname}${if withGnome then "-gnome" else ""}-${version}"; pname   = "NetworkManager-l2tp"; <del> version = networkmanager.version; </del> <ins> version = "1.2.4"; </ins> src = fetchFromGitHub { owner  = "nm-l2tp"; repo   = "network-manager-l2tp"; <del> rev    = "c0cedda5e2a0ded695b497c361eaf577068520cb"; sha256 = "01f39ghc37vw4n4i7whyikgqz8vzxf41q9fsv2gfw1g501cny1j2"; </del> <ins> rev    = "${version}"; sha256 = "1mvn0z1vl4j9drl3dsw2dv0pppqvj29d2m07487dzzi8cbxrqj36"; </ins> }; buildInputs = [ networkmanager ppp libsecret ]