at 16.09-beta 713 B view raw
1{ config, lib, pkgs, ... }: 2 3with lib; 4 5let kernelVersion = config.boot.kernelPackages.kernel.version; in 6 7{ 8 9 ###### interface 10 11 options = { 12 13 networking.enableB43Firmware = mkOption { 14 default = false; 15 type = types.bool; 16 description = '' 17 Turn on this option if you want firmware for the NICs supported by the b43 module. 18 ''; 19 }; 20 21 }; 22 23 24 ###### implementation 25 26 config = mkIf config.networking.enableB43Firmware { 27 assertions = singleton 28 { assertion = lessThan 0 (builtins.compareVersions kernelVersion "3.2"); 29 message = "b43 firmware for kernels older than 3.2 not packaged yet!"; 30 }; 31 hardware.firmware = [ pkgs.b43Firmware_5_1_138 ]; 32 }; 33 34}