diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-11-12 13:48:19 +0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-11-12 13:48:30 +0100 |
commit | 785eaf2cea3c57daef96bb209f44589e3f48a7ff (patch) | |
tree | 3324d7de769b7a5c063107b09b294b6af2b823e1 /nixos/modules/hardware | |
parent | 39e9fabae0fe5476ad682a52dba42b2c6dbe1a57 (diff) | |
download | nixpkgs-785eaf2cea3c57daef96bb209f44589e3f48a7ff.tar nixpkgs-785eaf2cea3c57daef96bb209f44589e3f48a7ff.tar.gz nixpkgs-785eaf2cea3c57daef96bb209f44589e3f48a7ff.tar.bz2 nixpkgs-785eaf2cea3c57daef96bb209f44589e3f48a7ff.tar.lz nixpkgs-785eaf2cea3c57daef96bb209f44589e3f48a7ff.tar.xz nixpkgs-785eaf2cea3c57daef96bb209f44589e3f48a7ff.tar.zst nixpkgs-785eaf2cea3c57daef96bb209f44589e3f48a7ff.zip |
Add some primops to lib
Diffstat (limited to 'nixos/modules/hardware')
-rw-r--r-- | nixos/modules/hardware/network/b43.nix | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/nixos/modules/hardware/network/b43.nix b/nixos/modules/hardware/network/b43.nix index 8f45bd4d3f1..03f81f92ef0 100644 --- a/nixos/modules/hardware/network/b43.nix +++ b/nixos/modules/hardware/network/b43.nix @@ -1,4 +1,6 @@ -{pkgs, config, ...}: +{ config, pkgs, ... }: + +with pkgs.lib; let kernelVersion = config.boot.kernelPackages.kernel.version; in @@ -8,9 +10,9 @@ let kernelVersion = config.boot.kernelPackages.kernel.version; in options = { - networking.enableB43Firmware = pkgs.lib.mkOption { + networking.enableB43Firmware = mkOption { default = false; - type = pkgs.lib.types.bool; + type = types.bool; description = '' Turn on this option if you want firmware for the NICs supported by the b43 module. ''; @@ -21,11 +23,11 @@ let kernelVersion = config.boot.kernelPackages.kernel.version; in ###### implementation - config = pkgs.lib.mkIf config.networking.enableB43Firmware { - assertions = [ { - assertion = builtins.lessThan 0 (builtins.compareVersions kernelVersion "3.2"); - message = "b43 firmware for kernels older than 3.2 not packaged yet!"; - } ]; + 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!"; + }; hardware.firmware = [ pkgs.b43Firmware_5_1_138 ]; }; |