mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-25 12:22:37 +03:00
Merge pull request #25636 from Mic92/firmware
hardware: add enableRedistributalFirmware
This commit is contained in:
commit
5385a8e216
@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
{
|
let
|
||||||
|
cfg = config.hardware;
|
||||||
|
in {
|
||||||
|
|
||||||
###### interface
|
###### interface
|
||||||
|
|
||||||
@ -12,7 +14,16 @@ with lib;
|
|||||||
default = false;
|
default = false;
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
description = ''
|
description = ''
|
||||||
Turn on this option if you want to enable all the firmware shipped in linux-firmware.
|
Turn on this option if you want to enable all the firmware.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
hardware.enableRedistributalFirmware = mkOption {
|
||||||
|
default = false;
|
||||||
|
type = types.bool;
|
||||||
|
description = ''
|
||||||
|
Turn on this option if you want to enable all the firmware with a license allowing redistribution.
|
||||||
|
(i.e. free firmware and <literal>firmware-linux-nonfree</literal>)
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -21,15 +32,27 @@ with lib;
|
|||||||
|
|
||||||
###### implementation
|
###### implementation
|
||||||
|
|
||||||
config = mkIf config.hardware.enableAllFirmware {
|
config = mkMerge [
|
||||||
hardware.firmware = with pkgs; [
|
(mkIf (cfg.enableAllFirmware || cfg.enableRedistributalFirmware) {
|
||||||
firmwareLinuxNonfree
|
hardware.firmware = with pkgs; [
|
||||||
intel2200BGFirmware
|
firmwareLinuxNonfree
|
||||||
rtl8723bs-firmware
|
intel2200BGFirmware
|
||||||
rtl8192su-firmware
|
rtl8723bs-firmware
|
||||||
] ++ optionals config.nixpkgs.config.allowUnfree [
|
rtl8192su-firmware
|
||||||
broadcom-bt-firmware
|
];
|
||||||
];
|
})
|
||||||
};
|
(mkIf cfg.enableAllFirmware {
|
||||||
|
assertions = [{
|
||||||
|
assertion = !cfg.enableAllFirmware || (config.nixpkgs.config.allowUnfree or false);
|
||||||
|
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.enableRedistributalFirmware option.
|
||||||
|
'';
|
||||||
|
}];
|
||||||
|
hardware.firmware = with pkgs; [
|
||||||
|
broadcom-bt-firmware
|
||||||
|
];
|
||||||
|
})
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
hardware.enableAllFirmware = true;
|
hardware.enableRedistributalFirmware = true;
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
hardware.enableAllFirmware = true;
|
hardware.enableRedistributalFirmware = true;
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
config = lib.mkIf config.networking.enableIntel2100BGFirmware {
|
config = lib.mkIf config.networking.enableIntel2100BGFirmware {
|
||||||
|
|
||||||
hardware.enableAllFirmware = true;
|
hardware.enableRedistributalFirmware = true;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
config = lib.mkIf config.networking.enableIntel3945ABGFirmware {
|
config = lib.mkIf config.networking.enableIntel3945ABGFirmware {
|
||||||
|
|
||||||
hardware.enableAllFirmware = true;
|
hardware.enableRedistributalFirmware = true;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
hardware.enableAllFirmware = true;
|
hardware.enableRedistributalFirmware = true;
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
hardware.enableAllFirmware = true;
|
hardware.enableRedistributalFirmware = true;
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
hardware.enableAllFirmware = true;
|
hardware.enableRedistributalFirmware = true;
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
hardware.enableAllFirmware = true;
|
hardware.enableRedistributalFirmware = true;
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
hardware.enableAllFirmware = true;
|
hardware.enableRedistributalFirmware = true;
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
hardware.enableAllFirmware = true;
|
hardware.enableRedistributalFirmware = true;
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
###### implementation
|
###### implementation
|
||||||
|
|
||||||
config = lib.mkIf config.networking.enableRalinkFirmware {
|
config = lib.mkIf config.networking.enableRalinkFirmware {
|
||||||
hardware.enableAllFirmware = true;
|
hardware.enableRedistributalFirmware = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
###### implementation
|
###### implementation
|
||||||
|
|
||||||
config = lib.mkIf config.networking.enableRTL8192cFirmware {
|
config = lib.mkIf config.networking.enableRTL8192cFirmware {
|
||||||
hardware.enableAllFirmware = true;
|
hardware.enableRedistributalFirmware = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
hardware.enableAllFirmware = true;
|
hardware.enableRedistributalFirmware = true;
|
||||||
}
|
}
|
||||||
|
@ -5,5 +5,5 @@
|
|||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
{
|
{
|
||||||
hardware.enableAllFirmware = true;
|
hardware.enableRedistributalFirmware = true;
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
# Include lots of firmware.
|
# Include lots of firmware.
|
||||||
hardware.enableAllFirmware = true;
|
hardware.enableRedistributalFirmware = true;
|
||||||
|
|
||||||
imports =
|
imports =
|
||||||
[ ../hardware/network/zydas-zd1211.nix ];
|
[ ../hardware/network/zydas-zd1211.nix ];
|
||||||
|
Loading…
Reference in New Issue
Block a user