mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
nixos/wireless: only warn for no interfaces
A hard failure breaks the NixOS installer, which can't possibly know the interface names in advance.
This commit is contained in:
parent
eba5f5c1e5
commit
be01320a6c
1 changed files with 13 additions and 0 deletions
|
@ -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 ];
|
||||
|
|
Loading…
Reference in a new issue