diff --git a/nixos/modules/hardware/all-firmware.nix b/nixos/modules/hardware/all-firmware.nix index 0b946052b9d3..fc93b74003d2 100644 --- a/nixos/modules/hardware/all-firmware.nix +++ b/nixos/modules/hardware/all-firmware.nix @@ -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; [