mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 07:23:20 +00:00
Merge pull request #121530 from symphorien/wifireg
nixos: add option to load wireless regulatory database as firmware
This commit is contained in:
commit
407ef1dc6f
@ -35,6 +35,14 @@ in {
|
||||
'';
|
||||
};
|
||||
|
||||
hardware.wirelessRegulatoryDatabase = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Load the wireless regulatory database at boot.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -58,6 +66,7 @@ in {
|
||||
++ optionals (versionOlder config.boot.kernelPackages.kernel.version "4.13") [
|
||||
rtl8723bs-firmware
|
||||
];
|
||||
hardware.wirelessRegulatoryDatabase = true;
|
||||
})
|
||||
(mkIf cfg.enableAllFirmware {
|
||||
assertions = [{
|
||||
@ -75,5 +84,8 @@ in {
|
||||
b43FirmwareCutter
|
||||
] ++ optional (pkgs.stdenv.hostPlatform.isi686 || pkgs.stdenv.hostPlatform.isx86_64) facetimehd-firmware;
|
||||
})
|
||||
(mkIf cfg.wirelessRegulatoryDatabase {
|
||||
hardware.firmware = [ pkgs.wireless-regdb ];
|
||||
})
|
||||
];
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ let
|
||||
cfg = config.networking.networkmanager;
|
||||
|
||||
basePackages = with pkgs; [
|
||||
crda
|
||||
modemmanager
|
||||
networkmanager
|
||||
networkmanager-fortisslvpn
|
||||
@ -404,6 +403,8 @@ in {
|
||||
}
|
||||
];
|
||||
|
||||
hardware.wirelessRegulatoryDatabase = true;
|
||||
|
||||
environment.etc = with pkgs; {
|
||||
"NetworkManager/NetworkManager.conf".source = configFile;
|
||||
|
||||
|
@ -241,7 +241,8 @@ in {
|
||||
environment.systemPackages = [ package ];
|
||||
|
||||
services.dbus.packages = [ package ];
|
||||
services.udev.packages = [ pkgs.crda ];
|
||||
|
||||
hardware.wirelessRegulatoryDatabase = true;
|
||||
|
||||
# FIXME: start a separate wpa_supplicant instance per interface.
|
||||
systemd.services.wpa_supplicant = let
|
||||
|
Loading…
Reference in New Issue
Block a user