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