Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nixos/wpa_supplicant: finetune service dependencies
The current requires/wantedBy dependencies present a number of problems, especially for WiFi modules that might not be available at boot time (which is when the boot will be delayed by the service timeout of 1m30s.) Removal of `wantedBy` in particular avoids such blocking from taking place. Furthermore, once the service fails to launch at boot for this reason, the device appearing at a later date (most relevant to USB-pluggable WiFi antennae,) the WPA supplicant wouldn't be launched, thus leaving the user to figure out the service startups for themselves, which in the worst case may be over network. The `upheldBy` dependency type will ensure that the supplicant is running for as long as the specified device exists, and the `bindsTo` dependency type makes systemd stop the service if the WiFi device goes away achieving the plug-and-play ideal. `upheldBy` here also replaces the `wantedBy` as a mechanism for getting the service enabled and started at all.
- Loading branch information