nixos/firmware: remove restrictive hardware.enableAllFirmware assertion (#441240)

This commit is contained in:
Sandro
2025-11-27 13:51:08 +00:00
committed by GitHub
+12 -11
View File
@@ -36,7 +36,18 @@ in
options = {
hardware.enableAllFirmware = lib.mkEnableOption "all firmware regardless of license";
hardware.enableAllFirmware = lib.mkOption {
default = false;
example = true;
description = ''
Whether to enable all firmware, including [unfree packages that must be explictly allowed](https://nixos.org/manual/nixpkgs/unstable/#sec-allow-unfree).
Alternatively, use the {option}`hardware.enableRedistributableFirmware` option.
'';
type = lib.types.bool;
};
hardware.enableRedistributableFirmware =
lib.mkEnableOption "firmware with a license allowing redistribution"
@@ -74,16 +85,6 @@ in
++ lib.optional pkgs.stdenv.hostPlatform.isAarch raspberrypiWirelessFirmware;
})
(lib.mkIf cfg.enableAllFirmware {
assertions = [
{
assertion = !cfg.enableAllFirmware || pkgs.config.allowUnfree;
message = ''
the list of hardware.enableAllFirmware contains non-redistributable licensed firmware files.
This requires nixpkgs.config.allowUnfree to be true.
An alternative is to use the hardware.enableRedistributableFirmware option.
'';
}
];
hardware.firmware =
with pkgs;
[