<commit_before>{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 {
    hardware.firmware = if builtins.lessThan (builtins.compareVersions kernelVersion "3.2") 0 then
      throw "b43 firmware for kernels older than 3.2 not packaged yet!" else
      [ pkgs.b43Firmware_5_1_138 ];
  };

}<commit_msg>Damn NixOS lack of laziness...<commit_after>{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 {
    assertions = [ {
      assertion = builtins.lessThan (builtins.compareVersions kernelVersion "3.2") 0;
      message = "b43 firmware for kernels older than 3.2 not packaged yet!";
    } ];
    hardware.firmware = [ pkgs.b43Firmware_5_1_138 ];
  };

}
{'fraction_non_alphanumeric': 0.11856368563685638, 'fraction_numerical': 0.02710027100271003, 'mean_word_length': 2.8664921465968587, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1188779', 'n_tokens_mistral': 515, 'n_tokens_neox': 464, 'n_words': 115}