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