uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
52
nixos/modules/hardware/video/webcam/facetimehd.nix
Normal file
52
nixos/modules/hardware/video/webcam/facetimehd.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.hardware.facetimehd;
|
||||
|
||||
kernelPackages = config.boot.kernelPackages;
|
||||
|
||||
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 {
|
||||
|
||||
boot.kernelModules = [ "facetimehd" ];
|
||||
|
||||
boot.blacklistedKernelModules = [ "bdc_pci" ];
|
||||
|
||||
boot.extraModulePackages = [ kernelPackages.facetimehd ];
|
||||
|
||||
hardware.firmware = [ pkgs.facetimehd-firmware ]
|
||||
++ optional cfg.withCalibration pkgs.facetimehd-calibration;
|
||||
|
||||
# unload module during suspend/hibernate as it crashes the whole system
|
||||
powerManagement.powerDownCommands = ''
|
||||
${pkgs.kmod}/bin/lsmod | ${pkgs.gnugrep}/bin/grep -q "^facetimehd" && ${pkgs.kmod}/bin/rmmod -f -v facetimehd
|
||||
'';
|
||||
|
||||
# and load it back on resume
|
||||
powerManagement.resumeCommands = ''
|
||||
${pkgs.kmod}/bin/modprobe -v facetimehd
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue