mirror of
				https://github.com/NixOS/nixos-hardware.git
				synced 2025-11-04 17:27:14 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
		
			558 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			558 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
{ config, lib, pkgs, ... }:
 | 
						|
let
 | 
						|
  cfg = config.hardware.microsoft-surface.firmware.surface-go-ath10k;
 | 
						|
in
 | 
						|
{
 | 
						|
  options = {
 | 
						|
    hardware.microsoft-surface.firmware.surface-go-ath10k = {
 | 
						|
      replace = lib.mkEnableOption ''Use the "board.bin" firmware for ath10k-based WiFi on Surface Go.'';
 | 
						|
    };
 | 
						|
  };
 | 
						|
 | 
						|
  config = lib.mkIf cfg.replace {
 | 
						|
    hardware.enableAllFirmware = true;
 | 
						|
    hardware.firmware = [
 | 
						|
      (pkgs.callPackage ./ath10k-replace.nix {})
 | 
						|
    ];
 | 
						|
 | 
						|
    boot.extraModprobeConfig = lib.mkDefault ''
 | 
						|
      options ath10k_core skip_otp=Y
 | 
						|
    '';
 | 
						|
  };
 | 
						|
}
 |