Unverified Commit e50363ff authored by rnhmjoj's avatar rnhmjoj
Browse files

nixos/wireless: remove restart on resume

This command was added a very long time ago (e9b2ef9f) and from
testing it doesn't seem to be necessary anymore: wpa_supplicant can
handle resuming from sleep just fine.

This also fixes a long delay when wpa_supplicant is controlled by
NetworkManager: https://github.com/NixOS/nixpkgs/issues/476906.
parent 4d6195b7
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -721,12 +721,6 @@ in
      else
        listToAttrs (map (i: nameValuePair "wpa_supplicant-${i}" (mkUnit i)) cfg.interfaces);

    # Restart wpa_supplicant after resuming from sleep
    powerManagement.resumeCommands = concatStringsSep "\n" (
      optional (cfg.interfaces == [ ]) "${systemctl} try-restart wpa_supplicant"
      ++ map (i: "${systemctl} try-restart wpa_supplicant-${i}") cfg.interfaces
    );

    # Restart wpa_supplicant when a wlan device appears or disappears. This is
    # only needed when an interface hasn't been specified by the user.
    services.udev.extraRules = optionalString (cfg.interfaces == [ ]) ''