nixpkgs/nixos/modules/hardware/network/b43.nix

33 lines
721 B
Nix
Raw Normal View History

2012-07-14 03:54:41 +00:00
{pkgs, config, ...}:
let kernelVersion = config.boot.kernelPackages.kernel.version; in
{
###### interface
options = {
networking.enableB43Firmware = pkgs.lib.mkOption {
default = false;
type = pkgs.lib.types.bool;
description = ''
Turn on this option if you want firmware for the NICs supported by the b43 module.
'';
};
};
###### implementation
config = pkgs.lib.mkIf config.networking.enableB43Firmware {
2012-09-03 14:35:45 +00:00
assertions = [ {
2012-09-03 16:11:07 +00:00
assertion = builtins.lessThan 0 (builtins.compareVersions kernelVersion "3.2");
2012-09-03 14:35:45 +00:00
message = "b43 firmware for kernels older than 3.2 not packaged yet!";
} ];
hardware.firmware = [ pkgs.b43Firmware_5_1_138 ];
2012-07-14 03:54:41 +00:00
};
}