Wlp4s0 keeps disconnecting

it’s not a hardware issue — wifi works fine on windows 11 dualboot and every other device connected to the router. why is this occuring on NixOS

You have provided no information at all, it’s impossible to answer your question.

  1. What is your network configuration?

  2. Are you using NetworkManager or wpa_supplicant?

  3. What do the logs show?

it was something with 802-11-wireless-security.psk-flags not being equal to 0, which was fixed with nmcli connection modify hidden_wifi 802-11-wireless-security.psk-flags 0

On boot everytime it fails to connect until systemctl restart NetworkManager with the systemctl status NetworkManager output of:


Dec 03 15:35:09 nixos NetworkManager[1121]: <warn>  [1764794109.2809] device (wlp4s0): wifi-scan: active scanning for networks due to profiles with wifi.hidden=yes. This makes you trackable
Dec 03 15:35:17 nixos NetworkManager[1121]: <warn>  [1764794117.3554] device (wlp4s0): no secrets: No agents were available for this request.
Dec 03 15:35:17 nixos NetworkManager[1121]: <warn>  [1764794117.4189] device (wlp4s0): Activation: failed for connection 'hidden_wifi'
```

so I’ll try installing hyprpolkitagent in environment.systemPackages to see if that works as per chatgpt AI recommendation.