2021-02-22 18:40:08 -05:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.hardware.microsoft-surface.firmware.surface-go-ath10k;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
hardware.microsoft-surface.firmware.surface-go-ath10k = {
|
2021-03-05 21:29:13 -05:00
|
|
|
replace = lib.mkEnableOption ''Use the "board.bin" firmware for ath10k-based WiFi on Surface Go.'';
|
2021-02-22 18:40:08 -05:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-03-05 21:29:13 -05:00
|
|
|
config = lib.mkIf cfg.replace {
|
2021-02-22 18:40:08 -05:00
|
|
|
hardware.enableAllFirmware = true;
|
|
|
|
hardware.firmware = [
|
2021-03-05 21:29:13 -05:00
|
|
|
(pkgs.callPackage ./ath10k-replace.nix {})
|
2021-02-22 18:40:08 -05:00
|
|
|
];
|
2021-02-22 23:59:34 -05:00
|
|
|
|
|
|
|
boot.extraModprobeConfig = lib.mkDefault ''
|
|
|
|
options ath10k_core skip_otp=Y
|
|
|
|
'';
|
2021-02-22 18:40:08 -05:00
|
|
|
};
|
|
|
|
}
|