diff options
| author | rnhmjoj <rnhmjoj@inventati.org> | 2021-06-07 16:01:52 +0200 |
|---|---|---|
| committer | Jonathan Ringer <jonringer@users.noreply.github.com> | 2021-06-08 08:52:41 -0700 |
| commit | f2c9d568c8a1e2d85362932b22eeb6d73e003f9f (patch) | |
| tree | 8d029ba64247e93adcb80ce5aef37c86ac41e518 | |
| parent | Revert "nixos/wireless: make wireless.interfaces mandatory" (diff) | |
| download | nixpkgs-f2c9d568c8a1e2d85362932b22eeb6d73e003f9f.tar.gz | |
nixos/wireless: only warn for no interfaces
A hard failure breaks the NixOS installer, which can't possibly
know the interface names in advance.
(cherry picked from commit be01320a6c39867eac0a20b4dfe04680d3b1ce26)
| -rw-r--r-- | nixos/modules/services/networking/wpa_supplicant.nix | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/nixos/modules/services/networking/wpa_supplicant.nix b/nixos/modules/services/networking/wpa_supplicant.nix index 8a0685c3d96b..c0a4ce40760a 100644 --- a/nixos/modules/services/networking/wpa_supplicant.nix +++ b/nixos/modules/services/networking/wpa_supplicant.nix @@ -42,6 +42,11 @@ in { description = '' The interfaces <command>wpa_supplicant</command> will use. If empty, it will automatically use all wireless interfaces. + <warning><para> + The automatic discovery of interfaces does not work reliably on boot: + it may fail and leave the system without network. When possible, specify + a known interface name. + </para></warning> ''; }; @@ -225,6 +230,14 @@ in { message = ''options networking.wireless."${name}".{psk,pskRaw,auth} are mutually exclusive''; }); + warnings = + optional (cfg.interfaces == [] && config.systemd.services.wpa_supplicant.wantedBy != []) + '' + No network interfaces for wpa_supplicant have been configured: the service + may randomly fail to start at boot. You should specify at least one using the option + networking.wireless.interfaces. + ''; + environment.systemPackages = [ package ]; services.dbus.packages = [ package ]; |
