diff options
Diffstat (limited to 'nixpkgs/nixos/modules/hardware/all-firmware.nix')
-rw-r--r-- | nixpkgs/nixos/modules/hardware/all-firmware.nix | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/nixpkgs/nixos/modules/hardware/all-firmware.nix b/nixpkgs/nixos/modules/hardware/all-firmware.nix index 5b60b17312f9..2d5a0007ff01 100644 --- a/nixpkgs/nixos/modules/hardware/all-firmware.nix +++ b/nixpkgs/nixos/modules/hardware/all-firmware.nix @@ -21,15 +21,16 @@ in { hardware.enableAllFirmware = mkOption { default = false; type = types.bool; - description = '' + description = lib.mdDoc '' Turn on this option if you want to enable all the firmware. ''; }; hardware.enableRedistributableFirmware = mkOption { - default = false; + default = config.hardware.enableAllFirmware; + defaultText = lib.literalExpression "config.hardware.enableAllFirmware"; type = types.bool; - description = '' + description = lib.mdDoc '' Turn on this option if you want to enable all the firmware with a license allowing redistribution. ''; }; @@ -37,7 +38,7 @@ in { hardware.wirelessRegulatoryDatabase = mkOption { default = false; type = types.bool; - description = '' + description = lib.mdDoc '' Load the wireless regulatory database at boot. ''; }; @@ -61,7 +62,7 @@ in { alsa-firmware sof-firmware libreelec-dvb-firmware - ] ++ optional (pkgs.stdenv.hostPlatform.isAarch32 || pkgs.stdenv.hostPlatform.isAarch64) raspberrypiWirelessFirmware + ] ++ optional pkgs.stdenv.hostPlatform.isAarch raspberrypiWirelessFirmware ++ optionals (versionOlder config.boot.kernelPackages.kernel.version "4.13") [ rtl8723bs-firmware ] ++ optionals (versionOlder config.boot.kernelPackages.kernel.version "5.16") [ @@ -71,7 +72,7 @@ in { }) (mkIf cfg.enableAllFirmware { assertions = [{ - assertion = !cfg.enableAllFirmware || (config.nixpkgs.config.allowUnfree or false); + assertion = !cfg.enableAllFirmware || config.nixpkgs.config.allowUnfree; message = '' the list of hardware.enableAllFirmware contains non-redistributable licensed firmware files. This requires nixpkgs.config.allowUnfree to be true. @@ -82,9 +83,11 @@ in { broadcom-bt-firmware b43Firmware_5_1_138 b43Firmware_6_30_163_46 - b43FirmwareCutter xow_dongle-firmware - ] ++ optional pkgs.stdenv.hostPlatform.isx86 facetimehd-firmware; + ] ++ optionals pkgs.stdenv.hostPlatform.isx86 [ + facetimehd-calibration + facetimehd-firmware + ]; }) (mkIf cfg.wirelessRegulatoryDatabase { hardware.firmware = [ pkgs.wireless-regdb ]; |