mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-05 09:38:07 +08:00
Update to a clearer directory-structure
This commit is contained in:
Binary file not shown.
33
microsoft/surface/firmware/surface-go/ath10k/ath10k.nix
Normal file
33
microsoft/surface/firmware/surface-go/ath10k/ath10k.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{stdenv, lib, pkgs, firmwareLinuxNonfree, ...}:
|
||||
let
|
||||
repos = (pkgs.callPackage ../repos.nix {});
|
||||
killernetworking_firmware = ./K1535_Debian;
|
||||
# killernetworking_firmware = repos.ath10k-firmware;
|
||||
in
|
||||
firmwareLinuxNonfree.overrideAttrs (old: rec {
|
||||
pname = "microsoft-surface-go-firmware-linux-nonfree";
|
||||
srcs = [
|
||||
firmwareLinuxNonfree.src
|
||||
ath10k
|
||||
];
|
||||
sourceRoot = firmwareLinuxNonfree.src;
|
||||
|
||||
dontMakeSourcesWritable = true;
|
||||
postInstall = ''
|
||||
# Delete the non-working firmware:
|
||||
rm -v $out/lib/firmware/ath10k/QCA6174/{hw2.1,hw3.0}/board.bin
|
||||
rm -v $out/lib/firmware/ath10k/QCA6174/{hw2.1,hw3.0}/board-2.bin
|
||||
|
||||
# Install the Surface Go Wifi firmware:
|
||||
cp ${killernetworking_firmware}/board.bin $out/lib/firmware/ath10k/QCA6174/hw2.1/
|
||||
cp ${killernetworking_firmware}/board.bin $out/lib/firmware/ath10k/QCA6174/hw3.0/
|
||||
'';
|
||||
|
||||
outputHash = "1nc56qii96dfvxnv3ad3lxz2rzyqcbldk0h9rbm3l2pgamkvj8dw";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Standard binary firmware collection, adjusted with the Surface Go WiFi firmware";
|
||||
platforms = platforms.linux;
|
||||
priority = 5;
|
||||
};
|
||||
})
|
||||
18
microsoft/surface/firmware/surface-go/ath10k/default.nix
Normal file
18
microsoft/surface/firmware/surface-go/ath10k/default.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.hardware.microsoft-surface.firmware.surface-go-ath10k;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
hardware.microsoft-surface.firmware.surface-go-ath10k = {
|
||||
enable = lib.mkEnableOption ''Use the "board.bin" firmware for ath10k-based WiFi on Surface Go.'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
hardware.enableAllFirmware = true;
|
||||
hardware.firmware = [
|
||||
(pkgs.callPackage ./ath10k.nix {})
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user