From e50363ff41b83b72b5dd1d0be359d16f63ee510b Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Mon, 12 Jan 2026 15:03:31 +0100 Subject: [PATCH] nixos/wireless: remove restart on resume This command was added a very long time ago (e9b2ef9fb7ba) 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. --- nixos/modules/services/networking/wpa_supplicant.nix | 6 ------ 1 file changed, 6 deletions(-) diff --git a/nixos/modules/services/networking/wpa_supplicant.nix b/nixos/modules/services/networking/wpa_supplicant.nix index 7751308312ce..f73622af3458 100644 --- a/nixos/modules/services/networking/wpa_supplicant.nix +++ b/nixos/modules/services/networking/wpa_supplicant.nix @@ -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 == [ ]) ''