mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-08 19:46:10 +01:00
chore: format repo using treefmt-nix and nixfmt-rfc-style
This commit is contained in:
parent
fc7c471412
commit
51e51e6014
266 changed files with 3721 additions and 2733 deletions
|
|
@ -5,8 +5,7 @@
|
|||
"hid_apple.iso_layout=0"
|
||||
];
|
||||
|
||||
hardware.facetimehd.enable = lib.mkDefault
|
||||
(config.nixpkgs.config.allowUnfree or false);
|
||||
hardware.facetimehd.enable = lib.mkDefault (config.nixpkgs.config.allowUnfree or false);
|
||||
|
||||
services.mbpfan.enable = lib.mkDefault true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../common/cpu/intel/kaby-lake
|
||||
|
|
@ -14,7 +15,12 @@
|
|||
|
||||
# apple smc (TODO: check spi)
|
||||
boot = {
|
||||
initrd.kernelModules = ["applespi" "spi_pxa2xx_platform" "intel_lpss_pci" "applesmc" ];
|
||||
initrd.kernelModules = [
|
||||
"applespi"
|
||||
"spi_pxa2xx_platform"
|
||||
"intel_lpss_pci"
|
||||
"applesmc"
|
||||
];
|
||||
kernelParams = [ "intel_iommu=on" ];
|
||||
kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.0") pkgs.linuxPackages_latest;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
imports = [
|
||||
../../.
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ in
|
|||
services.udev.extraRules =
|
||||
# Disable XHC1 wakeup signal to avoid resume getting triggered some time
|
||||
# after suspend. Reboot required for this to take effect.
|
||||
lib.optionalString
|
||||
(lib.versionAtLeast kernelPackages.kernel.version "3.13")
|
||||
lib.optionalString (lib.versionAtLeast kernelPackages.kernel.version "3.13")
|
||||
''SUBSYSTEM=="pci", KERNEL=="0000:00:14.0", ATTR{power/wakeup}="disabled"'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
{ lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
|
|
@ -19,7 +24,7 @@
|
|||
powerDownCommands = lib.mkBefore ''
|
||||
${pkgs.kmod}/bin/rmmod -f -v brcmfmac_wcc 2>/dev/null || true
|
||||
${pkgs.kmod}/bin/rmmod brcmfmac
|
||||
'';
|
||||
'';
|
||||
};
|
||||
|
||||
# USB subsystem wakes up MBP right after suspend unless we disable it.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../common/cpu/intel/kaby-lake
|
||||
|
|
@ -15,7 +16,12 @@
|
|||
# https://www.kernelconfig.io/config_keyboard_applespi
|
||||
|
||||
boot = {
|
||||
initrd.kernelModules = ["applespi" "spi_pxa2xx_platform" "intel_lpss_pci" "applesmc" ];
|
||||
initrd.kernelModules = [
|
||||
"applespi"
|
||||
"spi_pxa2xx_platform"
|
||||
"intel_lpss_pci"
|
||||
"applesmc"
|
||||
];
|
||||
kernelParams = [ "intel_iommu=on" ];
|
||||
kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.0") pkgs.linuxPackages_latest;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ let
|
|||
overrideAudioFiles =
|
||||
package: pluginsPath:
|
||||
package.overrideAttrs (
|
||||
new: old: {
|
||||
_new: old: {
|
||||
preConfigurePhases = old.preConfigurePhases or [ ] ++ [ "postPatchPhase" ];
|
||||
postPatchPhase = ''
|
||||
cp -r ${audioFiles}/files/{profile-sets,paths} ${pluginsPath}/alsa/mixer/
|
||||
|
|
@ -106,11 +106,16 @@ in
|
|||
powerManagement.enable = true;
|
||||
}
|
||||
|
||||
(if lib.versionAtLeast nixosVersion "25.05" then {
|
||||
services.pulseaudio.package = overrideAudioFiles pkgs.pulseaudio "src/modules/";
|
||||
} else {
|
||||
hardware.pulseaudio.package = overrideAudioFiles pkgs.pulseaudio "src/modules/";
|
||||
})
|
||||
(
|
||||
if lib.versionAtLeast nixosVersion "25.05" then
|
||||
{
|
||||
services.pulseaudio.package = overrideAudioFiles pkgs.pulseaudio "src/modules/";
|
||||
}
|
||||
else
|
||||
{
|
||||
hardware.pulseaudio.package = overrideAudioFiles pkgs.pulseaudio "src/modules/";
|
||||
}
|
||||
)
|
||||
|
||||
(lib.mkIf t2Cfg.enableIGPU {
|
||||
# Enable the iGPU by default if present
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue