nixos-hardware/microsoft/surface/firmware/surface-go/ath10k/default.nix

26 lines
596 B
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
2022-12-04 22:01:37 -05:00
let
2022-12-04 22:01:37 -05:00
inherit (lib) mkDefault mkEnableOption mkIf;
cfg = config.hardware.microsoft-surface.firmware.surface-go-ath10k;
2022-12-04 22:01:37 -05:00
in {
options = {
hardware.microsoft-surface.firmware.surface-go-ath10k = {
2022-12-04 22:01:37 -05:00
replace = mkEnableOption ''Use the "board.bin" firmware for ath10k-based WiFi on Surface Go.'';
};
};
2022-12-04 22:01:37 -05:00
config = mkIf cfg.replace {
hardware.enableAllFirmware = true;
hardware.firmware = [
(pkgs.callPackage ./ath10k-replace.nix {})
];
2022-12-04 22:01:37 -05:00
boot.extraModprobeConfig = mkDefault ''
options ath10k_core skip_otp=Y
'';
};
}