mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-05 01:37:24 +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
|
||||
inherit (lib) types;
|
||||
@@ -15,13 +20,16 @@ let
|
||||
substituteInPlace $out/lib/udev/rules.d/*.rules --replace "/usr/bin/sed" "${pkgs.gnused}/bin/sed"
|
||||
'';
|
||||
|
||||
overrideAudioFiles = package: pluginsPath:
|
||||
package.overrideAttrs (new: old: {
|
||||
overrideAudioFiles =
|
||||
package: pluginsPath:
|
||||
package.overrideAttrs (
|
||||
new: old: {
|
||||
preConfigurePhases = old.preConfigurePhases or [ ] ++ [ "postPatchPhase" ];
|
||||
postPatchPhase = ''
|
||||
cp -r ${audioFiles}/files/{profile-sets,paths} ${pluginsPath}/alsa/mixer/
|
||||
'';
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
pipewirePackage = overrideAudioFiles pkgs.pipewire "spa/plugins/";
|
||||
|
||||
@@ -68,7 +76,11 @@ in
|
||||
services.udev.packages = [ audioFilesUdevRules ];
|
||||
|
||||
# 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/";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user