nixos/firmware: remove restrictive hardware.enableAllFirmware assertion (#441240)
This commit is contained in:
@@ -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;
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user