mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-08 10:58:37 +08:00
apple/t2: format with nixfmt
This commit is contained in:
committed by
mergify[bot]
parent
a0252d668c
commit
cda8312060
@@ -1,4 +1,9 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) types;
|
inherit (lib) types;
|
||||||
@@ -15,13 +20,16 @@ let
|
|||||||
substituteInPlace $out/lib/udev/rules.d/*.rules --replace "/usr/bin/sed" "${pkgs.gnused}/bin/sed"
|
substituteInPlace $out/lib/udev/rules.d/*.rules --replace "/usr/bin/sed" "${pkgs.gnused}/bin/sed"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
overrideAudioFiles = package: pluginsPath:
|
overrideAudioFiles =
|
||||||
package.overrideAttrs (new: old: {
|
package: pluginsPath:
|
||||||
|
package.overrideAttrs (
|
||||||
|
new: old: {
|
||||||
preConfigurePhases = old.preConfigurePhases or [ ] ++ [ "postPatchPhase" ];
|
preConfigurePhases = old.preConfigurePhases or [ ] ++ [ "postPatchPhase" ];
|
||||||
postPatchPhase = ''
|
postPatchPhase = ''
|
||||||
cp -r ${audioFiles}/files/{profile-sets,paths} ${pluginsPath}/alsa/mixer/
|
cp -r ${audioFiles}/files/{profile-sets,paths} ${pluginsPath}/alsa/mixer/
|
||||||
'';
|
'';
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
pipewirePackage = overrideAudioFiles pkgs.pipewire "spa/plugins/";
|
pipewirePackage = overrideAudioFiles pkgs.pipewire "spa/plugins/";
|
||||||
|
|
||||||
@@ -68,7 +76,11 @@ in
|
|||||||
services.udev.packages = [ audioFilesUdevRules ];
|
services.udev.packages = [ audioFilesUdevRules ];
|
||||||
|
|
||||||
# For audio
|
# For audio
|
||||||
boot.kernelParams = [ "pcie_ports=compat" "intel_iommu=on" "iommu=pt" ];
|
boot.kernelParams = [
|
||||||
|
"pcie_ports=compat"
|
||||||
|
"intel_iommu=on"
|
||||||
|
"iommu=pt"
|
||||||
|
];
|
||||||
|
|
||||||
hardware.pulseaudio.package = overrideAudioFiles pkgs.pulseaudio "src/modules/";
|
hardware.pulseaudio.package = overrideAudioFiles pkgs.pulseaudio "src/modules/";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user