mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-04 01:07:14 +08:00
chore: format repo using treefmt-nix and nixfmt-rfc-style
This commit is contained in:
@@ -1,9 +1,18 @@
|
||||
# Patch sourced from https://github.com/christian-bendiksen/kernel-6.8.0-63.16ARHA7.fc40
|
||||
{ pkgs, lib, kernel ? pkgs.linuxPackages_latest.kernel }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
kernel ? pkgs.linuxPackages_latest.kernel,
|
||||
}:
|
||||
|
||||
pkgs.stdenv.mkDerivation {
|
||||
pname = "lenovo-16ARHA7-speaker-fix-module";
|
||||
inherit (kernel) src version postPatch nativeBuildInputs;
|
||||
inherit (kernel)
|
||||
src
|
||||
version
|
||||
postPatch
|
||||
nativeBuildInputs
|
||||
;
|
||||
|
||||
kernel_dev = kernel.dev;
|
||||
kernelVersion = kernel.modDirVersion;
|
||||
@@ -29,10 +38,10 @@ pkgs.stdenv.mkDerivation {
|
||||
modules_install
|
||||
'';
|
||||
|
||||
patches = [ ./lenovo_16ARHA7_sound_fix.patch ];
|
||||
patches = [ ./lenovo_16ARHA7_sound_fix.patch ];
|
||||
|
||||
meta = {
|
||||
description = "Patch to get the speakers working for Lenovo Legion Slim 7 Gen 7 AMD (16ARHA7)";
|
||||
license = lib.licenses.gpl3;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
lenovo-speaker-fix = pkgs.callPackage ./audio/lenovo-16ARHA7_speaker-fix.nix {
|
||||
@@ -15,7 +20,9 @@ in
|
||||
];
|
||||
|
||||
# Kernel 6.10 includes the speaker fix, so only install this on systems with older kernels.
|
||||
boot.extraModulePackages = lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.10") [ lenovo-speaker-fix ];
|
||||
boot.extraModulePackages =
|
||||
lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.10")
|
||||
[ lenovo-speaker-fix ];
|
||||
|
||||
# √(2560² + 1600²) px / 16 in ≃ 189 dpi
|
||||
services.xserver.dpi = 189;
|
||||
|
||||
Reference in New Issue
Block a user