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