nixos/iwd: fix DriverQuirks.DefaultInterface config option
[DriverQuirks].DefaultInterface option accepts a comma-separated list of drivers or glob matches as its value.
This commit is contained in:
@@ -13,17 +13,18 @@ let
|
|||||||
mkOption
|
mkOption
|
||||||
types
|
types
|
||||||
recursiveUpdate
|
recursiveUpdate
|
||||||
|
optionalAttrs
|
||||||
;
|
;
|
||||||
|
|
||||||
cfg = config.networking.wireless.iwd;
|
cfg = config.networking.wireless.iwd;
|
||||||
ini = pkgs.formats.ini { };
|
ini = pkgs.formats.ini { };
|
||||||
defaults = {
|
defaults =
|
||||||
# without UseDefaultInterface, sometimes wlan0 simply goes AWOL with NetworkManager
|
with config.networking.networkmanager;
|
||||||
# https://iwd.wiki.kernel.org/interface_lifecycle#interface_management_in_iwd
|
optionalAttrs (enable && (wifi.backend == "iwd")) {
|
||||||
DriverQuirks.UseDefaultInterface =
|
# without DefaultInterface, sometimes wlan0 simply goes AWOL with NetworkManager
|
||||||
with config.networking.networkmanager;
|
# https://iwd.wiki.kernel.org/interface_lifecycle#interface_management_in_iwd
|
||||||
(enable && (wifi.backend == "iwd"));
|
DriverQuirks.DefaultInterface = "?*";
|
||||||
};
|
};
|
||||||
configFile = ini.generate "main.conf" (recursiveUpdate defaults cfg.settings);
|
configFile = ini.generate "main.conf" (recursiveUpdate defaults cfg.settings);
|
||||||
|
|
||||||
in
|
in
|
||||||
@@ -64,7 +65,7 @@ in
|
|||||||
{
|
{
|
||||||
assertion = !(cfg.settings ? General && cfg.settings.General ? UseDefaultInterface);
|
assertion = !(cfg.settings ? General && cfg.settings.General ? UseDefaultInterface);
|
||||||
message = ''
|
message = ''
|
||||||
`networking.wireless.iwd.settings.General.UseDefaultInterface` has been deprecated. Use `networking.wireless.iwd.settings.DriverQuirks.UseDefaultInterface` instead.
|
`networking.wireless.iwd.settings.General.UseDefaultInterface` has been deprecated. Use `networking.wireless.iwd.settings.DriverQuirks.DefaultInterface` instead.
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user