mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 04:19:00 +02:00
nixos/facetimehd: add option hardware.facetimehd.withCalibration
The new option (disabled by default) pulls in the experimental sensor calibration files for the Facetime HD camera. These will also be pulled in by hardware.enableAllFirmware.
This commit is contained in:
parent
8d0b575eb4
commit
0d233ebed0
|
@ -84,7 +84,10 @@ in {
|
|||
b43Firmware_6_30_163_46
|
||||
b43FirmwareCutter
|
||||
xow_dongle-firmware
|
||||
] ++ optional pkgs.stdenv.hostPlatform.isx86 facetimehd-firmware;
|
||||
] ++ optionals pkgs.stdenv.hostPlatform.isx86 [
|
||||
facetimehd-calibration
|
||||
facetimehd-firmware
|
||||
];
|
||||
})
|
||||
(mkIf cfg.wirelessRegulatoryDatabase {
|
||||
hardware.firmware = [ pkgs.wireless-regdb ];
|
||||
|
|
|
@ -14,6 +14,18 @@ in
|
|||
|
||||
options.hardware.facetimehd.enable = mkEnableOption "facetimehd kernel module";
|
||||
|
||||
options.hardware.facetimehd.withCalibration = mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Whether to include sensor calibration files for facetimehd.
|
||||
This makes colors look much better but is experimental, see
|
||||
<link xlink:href="https://github.com/patjak/facetimehd/wiki/Extracting-the-sensor-calibration-files"/>
|
||||
for details.
|
||||
'';
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
assertions = singleton {
|
||||
|
@ -27,7 +39,8 @@ in
|
|||
|
||||
boot.extraModulePackages = [ kernelPackages.facetimehd ];
|
||||
|
||||
hardware.firmware = [ pkgs.facetimehd-firmware ];
|
||||
hardware.firmware = [ pkgs.facetimehd-firmware ]
|
||||
++ optional cfg.withCalibration pkgs.facetimehd-calibration;
|
||||
|
||||
# unload module during suspend/hibernate as it crashes the whole system
|
||||
powerManagement.powerDownCommands = ''
|
||||
|
|
Loading…
Reference in a new issue