Skip to content

Commit 76a66df

Browse files
committed
format nix code after nixfmt update
1 parent 93d25a2 commit 76a66df

File tree

10 files changed

+86
-92
lines changed

10 files changed

+86
-92
lines changed

framework/13-inch/common/amd.nix

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,18 @@
66
../../../common/gpu/amd
77
];
88

9-
boot.kernelParams =
10-
[
11-
# There seems to be an issue with panel self-refresh (PSR) that
12-
# causes hangs for users.
13-
#
14-
# https://community.frame.work/t/fedora-kde-becomes-suddenly-slow/58459
15-
# https://gitlab.freedesktop.org/drm/amd/-/issues/3647
16-
"amdgpu.dcdebugmask=0x10"
17-
]
18-
# Workaround for SuspendThenHibernate: https://lore.kernel.org/linux-kernel/20231106162310.85711-1-mario.limonciello@amd.com/
19-
++ lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") [
20-
"rtc_cmos.use_acpi_alarm=1"
21-
];
9+
boot.kernelParams = [
10+
# There seems to be an issue with panel self-refresh (PSR) that
11+
# causes hangs for users.
12+
#
13+
# https://community.frame.work/t/fedora-kde-becomes-suddenly-slow/58459
14+
# https://gitlab.freedesktop.org/drm/amd/-/issues/3647
15+
"amdgpu.dcdebugmask=0x10"
16+
]
17+
# Workaround for SuspendThenHibernate: https://lore.kernel.org/linux-kernel/20231106162310.85711-1-mario.limonciello@amd.com/
18+
++ lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") [
19+
"rtc_cmos.use_acpi_alarm=1"
20+
];
2221

2322
# AMD has better battery life with PPD over TLP:
2423
# https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13

framework/13-inch/common/intel.nix

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,15 @@
99
../../../common/cpu/intel
1010
];
1111

12-
boot.kernelParams =
13-
[
14-
# For Power consumption
15-
# https://community.frame.work/t/linux-battery-life-tuning/6665/156
16-
"nvme.noacpi=1"
17-
]
18-
# Fixes a regression in s2idle, making it more power efficient than deep sleep
19-
# Update 04/2024: It appears that s2idle-regression got fixed in newer kernel-versions (SebTM)
20-
# (see: https://github.com/NixOS/nixos-hardware/pull/903#discussion_r1556096657)
21-
++ lib.lists.optional (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") "acpi_osi=\"!Windows 2020\"";
12+
boot.kernelParams = [
13+
# For Power consumption
14+
# https://community.frame.work/t/linux-battery-life-tuning/6665/156
15+
"nvme.noacpi=1"
16+
]
17+
# Fixes a regression in s2idle, making it more power efficient than deep sleep
18+
# Update 04/2024: It appears that s2idle-regression got fixed in newer kernel-versions (SebTM)
19+
# (see: https://github.com/NixOS/nixos-hardware/pull/903#discussion_r1556096657)
20+
++ lib.lists.optional (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") "acpi_osi=\"!Windows 2020\"";
2221

2322
# Requires at least 5.16 for working wi-fi and bluetooth.
2423
# https://community.frame.work/t/using-the-ax210-with-linux-on-the-framework-laptop/1844/89

framework/16-inch/common/amd.nix

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,18 @@
66
../../../common/gpu/amd
77
];
88

9-
boot.kernelParams =
10-
[
11-
# There seems to be an issue with panel self-refresh (PSR) that
12-
# causes hangs for users.
13-
#
14-
# https://community.frame.work/t/fedora-kde-becomes-suddenly-slow/58459
15-
# https://gitlab.freedesktop.org/drm/amd/-/issues/3647
16-
"amdgpu.dcdebugmask=0x10"
17-
]
18-
# Workaround for SuspendThenHibernate: https://lore.kernel.org/linux-kernel/20231106162310.85711-1-mario.limonciello@amd.com/
19-
++ lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") [
20-
"rtc_cmos.use_acpi_alarm=1"
21-
];
9+
boot.kernelParams = [
10+
# There seems to be an issue with panel self-refresh (PSR) that
11+
# causes hangs for users.
12+
#
13+
# https://community.frame.work/t/fedora-kde-becomes-suddenly-slow/58459
14+
# https://gitlab.freedesktop.org/drm/amd/-/issues/3647
15+
"amdgpu.dcdebugmask=0x10"
16+
]
17+
# Workaround for SuspendThenHibernate: https://lore.kernel.org/linux-kernel/20231106162310.85711-1-mario.limonciello@amd.com/
18+
++ lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") [
19+
"rtc_cmos.use_acpi_alarm=1"
20+
];
2221

2322
# AMD has better battery life with PPD over TLP:
2423
# https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13

lenovo/legion/15ach6h/nvidia/default.nix

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@
1010
# remove all packages for amd igpu. I only removed amdgpu from
1111
# services.xserver.videoDrivers by overriding. This is because the specialization
1212
# of nix cannot implement such an operation as canceling an import.
13-
hardware =
14-
{
15-
nvidia.prime.offload.enable = false;
16-
}
17-
// lib.optionalAttrs (options ? amdgpu.opencl.enable) {
18-
# introduced in https://github.com/NixOS/nixpkgs/pull/319865
19-
amdgpu.opencl.enable = lib.mkDefault false;
20-
};
13+
hardware = {
14+
nvidia.prime.offload.enable = false;
15+
}
16+
// lib.optionalAttrs (options ? amdgpu.opencl.enable) {
17+
# introduced in https://github.com/NixOS/nixpkgs/pull/319865
18+
amdgpu.opencl.enable = lib.mkDefault false;
19+
};
2120
}

lenovo/legion/16ach6h/nvidia/default.nix

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@
1010
# remove all packages for amd igpu. I only removed amdgpu from
1111
# services.xserver.videoDrivers by overriding. This is because the specialization
1212
# of nix cannot implement such an operation as canceling an import.
13-
hardware =
14-
{
15-
nvidia.prime.offload.enable = false;
16-
}
17-
// lib.optionalAttrs (options ? amdgpu.opencl.enable) {
18-
# introduced in https://github.com/NixOS/nixpkgs/pull/319865
19-
amdgpu.opencl.enable = lib.mkDefault false;
20-
};
13+
hardware = {
14+
nvidia.prime.offload.enable = false;
15+
}
16+
// lib.optionalAttrs (options ? amdgpu.opencl.enable) {
17+
# introduced in https://github.com/NixOS/nixpkgs/pull/319865
18+
amdgpu.opencl.enable = lib.mkDefault false;
19+
};
2120
}

lenovo/legion/16achg6/nvidia/default.nix

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@
33
{
44
imports = [ ../hybrid ];
55
services.xserver.videoDrivers = [ "nvidia" ];
6-
hardware =
7-
{
8-
nvidia.prime.offload.enable = false;
9-
}
10-
// lib.optionalAttrs (options ? amdgpu.opencl.enable) {
11-
# introduced in https://github.com/NixOS/nixpkgs/pull/319865
12-
amdgpu.opencl.enable = lib.mkDefault false;
13-
};
6+
hardware = {
7+
nvidia.prime.offload.enable = false;
8+
}
9+
// lib.optionalAttrs (options ? amdgpu.opencl.enable) {
10+
# introduced in https://github.com/NixOS/nixpkgs/pull/319865
11+
amdgpu.opencl.enable = lib.mkDefault false;
12+
};
1413
}

lenovo/thinkpad/p14s/amd/gen2/default.nix

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@
1414

1515
# amdgpu.backlight=0 makes the backlight work
1616
# acpi_backlight=none allows the backlight save/load systemd service to work on older kernel versions
17-
boot.kernelParams =
18-
[ "amdgpu.backlight=0" ]
19-
++ lib.optional (lib.versionOlder config.boot.kernelPackages.kernel.version "6.1.6") "acpi_backlight=none";
17+
boot.kernelParams = [
18+
"amdgpu.backlight=0"
19+
]
20+
++ lib.optional (lib.versionOlder config.boot.kernelPackages.kernel.version "6.1.6") "acpi_backlight=none";
2021

2122
# For mainline support of rtw89 wireless networking
2223
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest;

microsoft/surface/common/kernel/linux-package.nix

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,18 @@ let
2424
let
2525
inherit (builtins) removeAttrs;
2626

27-
args' =
28-
{
29-
inherit
30-
src
31-
version
32-
modDirVersion
33-
kernelPatches
34-
;
35-
}
36-
// removeAttrs args [
37-
"url"
38-
"sha256"
39-
];
27+
args' = {
28+
inherit
29+
src
30+
version
31+
modDirVersion
32+
kernelPatches
33+
;
34+
}
35+
// removeAttrs args [
36+
"url"
37+
"sha256"
38+
];
4039
linuxPackage = buildLinux args';
4140
linuxPackages' = recurseIntoAttrs (linuxPackagesFor linuxPackage);
4241
in

nxp/common/bsp/imx-firmware.nix

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,20 @@ pkgs.stdenv.mkDerivation rec {
4747
${firmwareSeco} --auto-accept --force
4848
'';
4949

50-
filesToInstall =
51-
[
52-
"firmware-imx-${fwHdmiVersion}/firmware/hdmi/cadence/dpfw.bin"
53-
"firmware-imx-${fwHdmiVersion}/firmware/hdmi/cadence/hdmi?xfw.bin"
54-
]
55-
++ pkgs.lib.optional (targetBoard == "imx8qm") (
56-
"imx-sc-firmware-${fwScVersion}/mx8qm-mek-scfw-tcm.bin"
57-
+ " "
58-
+ "imx-seco-${fwSecoVersion}/firmware/seco/mx8qmb0-ahab-container.img"
59-
)
60-
++ pkgs.lib.optional (targetBoard == "imx8qxp") (
61-
"imx-sc-firmware-${fwScVersion}/mx8qx-mek-scfw-tcm.bin"
62-
+ " "
63-
+ "imx-seco-${fwSecoVersion}/firmware/seco/mx8qxc0-ahab-container.img"
64-
);
50+
filesToInstall = [
51+
"firmware-imx-${fwHdmiVersion}/firmware/hdmi/cadence/dpfw.bin"
52+
"firmware-imx-${fwHdmiVersion}/firmware/hdmi/cadence/hdmi?xfw.bin"
53+
]
54+
++ pkgs.lib.optional (targetBoard == "imx8qm") (
55+
"imx-sc-firmware-${fwScVersion}/mx8qm-mek-scfw-tcm.bin"
56+
+ " "
57+
+ "imx-seco-${fwSecoVersion}/firmware/seco/mx8qmb0-ahab-container.img"
58+
)
59+
++ pkgs.lib.optional (targetBoard == "imx8qxp") (
60+
"imx-sc-firmware-${fwScVersion}/mx8qx-mek-scfw-tcm.bin"
61+
+ " "
62+
+ "imx-seco-${fwSecoVersion}/firmware/seco/mx8qxc0-ahab-container.img"
63+
);
6564

6665
installPhase = ''
6766
mkdir -p $out

pine64/star64/linux-5.15.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ let
4545
};
4646
}
4747
{ patch = ./irq-desc-to-data.patch; }
48-
] ++ kernelPatches;
48+
]
49+
++ kernelPatches;
4950

5051
structuredExtraConfig = with lib.kernel; {
5152
# A ton of stuff just does not build. We disable it all.

0 commit comments

Comments
 (0)