mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-05 01:37:24 +08:00
chore: format repo using treefmt-nix and nixfmt-rfc-style
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
{ stdenv, lib, pkgs, firmwareLinuxNonfree, ... }:
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
pkgs,
|
||||
firmwareLinuxNonfree,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
repos = pkgs.callPackage {
|
||||
@@ -8,14 +14,18 @@ let
|
||||
rev = "74e5409e699383d6ca2bc4da4a8433d16f3850b1";
|
||||
sha256 = "169vgvxpgad9anmchs22fj5qm6ahzjfdnwhd8pc280q705vx6pjk";
|
||||
};
|
||||
} {};
|
||||
} { };
|
||||
killernetworking_firmware = repos.surface-go-ath10k-firmware_backup + "/K1535_Debian";
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "microsoft-surface-go-firmware-linux-nonfree";
|
||||
inherit (firmwareLinuxNonfree) version;
|
||||
src = firmwareLinuxNonfree;
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
phases = [
|
||||
"unpackPhase"
|
||||
"installPhase"
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
# Install the Surface Go Wifi firmware:
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib) mkDefault mkEnableOption mkIf;
|
||||
|
||||
cfg = config.hardware.microsoft-surface.firmware.surface-go-ath10k;
|
||||
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
hardware.microsoft-surface.firmware.surface-go-ath10k = {
|
||||
replace = mkEnableOption ''Use the "board.bin" firmware for ath10k-based WiFi on Surface Go.'';
|
||||
@@ -13,18 +19,21 @@ in {
|
||||
};
|
||||
|
||||
config = mkIf cfg.replace {
|
||||
warnings = [''A working version of the ath10k QCA6174 firmware has been added to the kernel.org linux-firmware
|
||||
repo, making this fix obsolete.
|
||||
See:
|
||||
- https://github.com/linux-surface/linux-surface/issues/542#issuecomment-976995453
|
||||
- https://github.com/linux-surface/linux-surface/wiki/Surface-Go#wi-fi-firmware
|
||||
warnings = [
|
||||
''
|
||||
A working version of the ath10k QCA6174 firmware has been added to the kernel.org linux-firmware
|
||||
repo, making this fix obsolete.
|
||||
See:
|
||||
- https://github.com/linux-surface/linux-surface/issues/542#issuecomment-976995453
|
||||
- https://github.com/linux-surface/linux-surface/wiki/Surface-Go#wi-fi-firmware
|
||||
|
||||
NOTE: This module option will probably be removed in the near future.
|
||||
''];
|
||||
NOTE: This module option will probably be removed in the near future.
|
||||
''
|
||||
];
|
||||
|
||||
hardware.enableAllFirmware = true;
|
||||
hardware.firmware = [
|
||||
(pkgs.callPackage ./ath10k-replace.nix {})
|
||||
(pkgs.callPackage ./ath10k-replace.nix { })
|
||||
];
|
||||
|
||||
boot.extraModprobeConfig = mkDefault ''
|
||||
|
||||
Reference in New Issue
Block a user