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.
main
Alexander Shpilkin 2 years ago
parent 8d0b575eb4
commit 0d233ebed0
No known key found for this signature in database
GPG Key ID: 55F6F5B75637BD38
  1. 5
      nixos/modules/hardware/all-firmware.nix
  2. 15
      nixos/modules/hardware/video/webcam/facetimehd.nix

@ -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…
Cancel
Save