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
|
b43Firmware_6_30_163_46
|
||||||
b43FirmwareCutter
|
b43FirmwareCutter
|
||||||
xow_dongle-firmware
|
xow_dongle-firmware
|
||||||
] ++ optional pkgs.stdenv.hostPlatform.isx86 facetimehd-firmware;
|
] ++ optionals pkgs.stdenv.hostPlatform.isx86 [
|
||||||
|
facetimehd-calibration
|
||||||
|
facetimehd-firmware
|
||||||
|
];
|
||||||
})
|
})
|
||||||
(mkIf cfg.wirelessRegulatoryDatabase {
|
(mkIf cfg.wirelessRegulatoryDatabase {
|
||||||
hardware.firmware = [ pkgs.wireless-regdb ];
|
hardware.firmware = [ pkgs.wireless-regdb ];
|
||||||
|
|
|
@ -14,6 +14,18 @@ in
|
||||||
|
|
||||||
options.hardware.facetimehd.enable = mkEnableOption "facetimehd kernel module";
|
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 {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
assertions = singleton {
|
assertions = singleton {
|
||||||
|
@ -27,7 +39,8 @@ in
|
||||||
|
|
||||||
boot.extraModulePackages = [ kernelPackages.facetimehd ];
|
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
|
# unload module during suspend/hibernate as it crashes the whole system
|
||||||
powerManagement.powerDownCommands = ''
|
powerManagement.powerDownCommands = ''
|
||||||
|
|
Loading…
Reference in a new issue