Added an option to enable the firmware from 'firmware-linux-nonfree' and 'firmware-linux-free'.
svn path=/nixos/trunk/; revision=31502
This commit is contained in:
parent
0862ca9fa7
commit
3ef0f14925
26
modules/hardware/firmware-free.nix
Normal file
26
modules/hardware/firmware-free.nix
Normal file
@ -0,0 +1,26 @@
|
||||
{pkgs, config, ...}:
|
||||
|
||||
{
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
hardware.enableFirmwareLinuxFree = pkgs.lib.mkOption {
|
||||
default = false;
|
||||
type = pkgs.lib.types.bool;
|
||||
description = ''
|
||||
Turn on this option if you want the set of firmware of the linux-firmware-free package.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = pkgs.lib.mkIf config.hardware.enableFirmwareLinuxFree {
|
||||
hardware.firmware = [ pkgs.firmwareLinuxFree ];
|
||||
};
|
||||
|
||||
}
|
26
modules/hardware/firmware-nonfree.nix
Normal file
26
modules/hardware/firmware-nonfree.nix
Normal file
@ -0,0 +1,26 @@
|
||||
{pkgs, config, ...}:
|
||||
|
||||
{
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
hardware.enableFirmwareLinuxNonfree = pkgs.lib.mkOption {
|
||||
default = false;
|
||||
type = pkgs.lib.types.bool;
|
||||
description = ''
|
||||
Turn on this option if you want the set of firmware of the non-free package.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = pkgs.lib.mkIf config.hardware.enableFirmwareLinuxNonfree {
|
||||
hardware.firmware = [ pkgs.firmwareLinuxNonfree ];
|
||||
};
|
||||
|
||||
}
|
@ -20,6 +20,8 @@
|
||||
./hardware/network/rt73.nix
|
||||
./hardware/network/rtl8192c.nix
|
||||
./hardware/pcmcia.nix
|
||||
./hardware/firmware-nonfree.nix
|
||||
./hardware/firmware-free.nix
|
||||
./installer/generations-dir/generations-dir.nix
|
||||
./installer/grub/grub.nix
|
||||
./installer/init-script/init-script.nix
|
||||
|
Loading…
Reference in New Issue
Block a user