format nix code after nixfmt update

This commit is contained in:
Jörg Thalheim 2025-08-17 11:21:04 +02:00
parent 4bafcc2454
commit 6ec1e82182
13 changed files with 105 additions and 109 deletions

View file

@ -6,19 +6,18 @@
../../../common/gpu/amd ../../../common/gpu/amd
]; ];
boot.kernelParams = boot.kernelParams = [
[ # There seems to be an issue with panel self-refresh (PSR) that
# There seems to be an issue with panel self-refresh (PSR) that # causes hangs for users.
# causes hangs for users. #
# # https://community.frame.work/t/fedora-kde-becomes-suddenly-slow/58459
# https://community.frame.work/t/fedora-kde-becomes-suddenly-slow/58459 # https://gitlab.freedesktop.org/drm/amd/-/issues/3647
# https://gitlab.freedesktop.org/drm/amd/-/issues/3647 "amdgpu.dcdebugmask=0x10"
"amdgpu.dcdebugmask=0x10" ]
] # Workaround for SuspendThenHibernate: https://lore.kernel.org/linux-kernel/20231106162310.85711-1-mario.limonciello@amd.com/
# Workaround for SuspendThenHibernate: https://lore.kernel.org/linux-kernel/20231106162310.85711-1-mario.limonciello@amd.com/ ++ lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") [
++ lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") [ "rtc_cmos.use_acpi_alarm=1"
"rtc_cmos.use_acpi_alarm=1" ];
];
# AMD has better battery life with PPD over TLP: # AMD has better battery life with PPD over TLP:
# https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13 # https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13

View file

@ -9,16 +9,15 @@
../../../common/cpu/intel ../../../common/cpu/intel
]; ];
boot.kernelParams = boot.kernelParams = [
[ # For Power consumption
# For Power consumption # https://community.frame.work/t/linux-battery-life-tuning/6665/156
# https://community.frame.work/t/linux-battery-life-tuning/6665/156 "nvme.noacpi=1"
"nvme.noacpi=1" ]
] # Fixes a regression in s2idle, making it more power efficient than deep sleep
# Fixes a regression in s2idle, making it more power efficient than deep sleep # Update 04/2024: It appears that s2idle-regression got fixed in newer kernel-versions (SebTM)
# Update 04/2024: It appears that s2idle-regression got fixed in newer kernel-versions (SebTM) # (see: https://github.com/NixOS/nixos-hardware/pull/903#discussion_r1556096657)
# (see: https://github.com/NixOS/nixos-hardware/pull/903#discussion_r1556096657) ++ lib.lists.optional (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") "acpi_osi=\"!Windows 2020\"";
++ lib.lists.optional (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") "acpi_osi=\"!Windows 2020\"";
# Requires at least 5.16 for working wi-fi and bluetooth. # Requires at least 5.16 for working wi-fi and bluetooth.
# https://community.frame.work/t/using-the-ax210-with-linux-on-the-framework-laptop/1844/89 # https://community.frame.work/t/using-the-ax210-with-linux-on-the-framework-laptop/1844/89

View file

@ -6,19 +6,18 @@
../../../common/gpu/amd ../../../common/gpu/amd
]; ];
boot.kernelParams = boot.kernelParams = [
[ # There seems to be an issue with panel self-refresh (PSR) that
# There seems to be an issue with panel self-refresh (PSR) that # causes hangs for users.
# causes hangs for users. #
# # https://community.frame.work/t/fedora-kde-becomes-suddenly-slow/58459
# https://community.frame.work/t/fedora-kde-becomes-suddenly-slow/58459 # https://gitlab.freedesktop.org/drm/amd/-/issues/3647
# https://gitlab.freedesktop.org/drm/amd/-/issues/3647 "amdgpu.dcdebugmask=0x10"
"amdgpu.dcdebugmask=0x10" ]
] # Workaround for SuspendThenHibernate: https://lore.kernel.org/linux-kernel/20231106162310.85711-1-mario.limonciello@amd.com/
# Workaround for SuspendThenHibernate: https://lore.kernel.org/linux-kernel/20231106162310.85711-1-mario.limonciello@amd.com/ ++ lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") [
++ lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") [ "rtc_cmos.use_acpi_alarm=1"
"rtc_cmos.use_acpi_alarm=1" ];
];
# AMD has better battery life with PPD over TLP: # AMD has better battery life with PPD over TLP:
# https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13 # https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13

View file

@ -10,12 +10,11 @@
# remove all packages for amd igpu. I only removed amdgpu from # remove all packages for amd igpu. I only removed amdgpu from
# services.xserver.videoDrivers by overriding. This is because the specialization # services.xserver.videoDrivers by overriding. This is because the specialization
# of nix cannot implement such an operation as canceling an import. # of nix cannot implement such an operation as canceling an import.
hardware = hardware = {
{ nvidia.prime.offload.enable = false;
nvidia.prime.offload.enable = false; }
} // lib.optionalAttrs (options ? amdgpu.opencl.enable) {
// lib.optionalAttrs (options ? amdgpu.opencl.enable) { # introduced in https://github.com/NixOS/nixpkgs/pull/319865
# introduced in https://github.com/NixOS/nixpkgs/pull/319865 amdgpu.opencl.enable = lib.mkDefault false;
amdgpu.opencl.enable = lib.mkDefault false; };
};
} }

View file

@ -10,12 +10,11 @@
# remove all packages for amd igpu. I only removed amdgpu from # remove all packages for amd igpu. I only removed amdgpu from
# services.xserver.videoDrivers by overriding. This is because the specialization # services.xserver.videoDrivers by overriding. This is because the specialization
# of nix cannot implement such an operation as canceling an import. # of nix cannot implement such an operation as canceling an import.
hardware = hardware = {
{ nvidia.prime.offload.enable = false;
nvidia.prime.offload.enable = false; }
} // lib.optionalAttrs (options ? amdgpu.opencl.enable) {
// lib.optionalAttrs (options ? amdgpu.opencl.enable) { # introduced in https://github.com/NixOS/nixpkgs/pull/319865
# introduced in https://github.com/NixOS/nixpkgs/pull/319865 amdgpu.opencl.enable = lib.mkDefault false;
amdgpu.opencl.enable = lib.mkDefault false; };
};
} }

View file

@ -3,12 +3,11 @@
{ {
imports = [ ../hybrid ]; imports = [ ../hybrid ];
services.xserver.videoDrivers = [ "nvidia" ]; services.xserver.videoDrivers = [ "nvidia" ];
hardware = hardware = {
{ nvidia.prime.offload.enable = false;
nvidia.prime.offload.enable = false; }
} // lib.optionalAttrs (options ? amdgpu.opencl.enable) {
// lib.optionalAttrs (options ? amdgpu.opencl.enable) { # introduced in https://github.com/NixOS/nixpkgs/pull/319865
# introduced in https://github.com/NixOS/nixpkgs/pull/319865 amdgpu.opencl.enable = lib.mkDefault false;
amdgpu.opencl.enable = lib.mkDefault false; };
};
} }

View file

@ -14,9 +14,10 @@
# amdgpu.backlight=0 makes the backlight work # amdgpu.backlight=0 makes the backlight work
# acpi_backlight=none allows the backlight save/load systemd service to work on older kernel versions # acpi_backlight=none allows the backlight save/load systemd service to work on older kernel versions
boot.kernelParams = boot.kernelParams = [
[ "amdgpu.backlight=0" ] "amdgpu.backlight=0"
++ lib.optional (lib.versionOlder config.boot.kernelPackages.kernel.version "6.1.6") "acpi_backlight=none"; ]
++ lib.optional (lib.versionOlder config.boot.kernelPackages.kernel.version "6.1.6") "acpi_backlight=none";
# For mainline support of rtw89 wireless networking # For mainline support of rtw89 wireless networking
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest; boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest;

View file

@ -24,19 +24,18 @@ let
let let
inherit (builtins) removeAttrs; inherit (builtins) removeAttrs;
args' = args' = {
{ inherit
inherit src
src version
version modDirVersion
modDirVersion kernelPatches
kernelPatches ;
; }
} // removeAttrs args [
// removeAttrs args [ "url"
"url" "sha256"
"sha256" ];
];
linuxPackage = buildLinux args'; linuxPackage = buildLinux args';
linuxPackages' = recurseIntoAttrs (linuxPackagesFor linuxPackage); linuxPackages' = recurseIntoAttrs (linuxPackagesFor linuxPackage);
in in

View file

@ -139,7 +139,8 @@
device = "/iso/nix-store.squashfs"; device = "/iso/nix-store.squashfs";
options = [ options = [
"loop" "loop"
] ++ lib.optional (config.boot.kernelPackages.kernel.kernelAtLeast "6.2") "threads=multi"; ]
++ lib.optional (config.boot.kernelPackages.kernel.kernelAtLeast "6.2") "threads=multi";
neededForBoot = true; neededForBoot = true;
}; };

View file

@ -47,21 +47,20 @@ pkgs.stdenv.mkDerivation rec {
${firmwareSeco} --auto-accept --force ${firmwareSeco} --auto-accept --force
''; '';
filesToInstall = filesToInstall = [
[ "firmware-imx-${fwHdmiVersion}/firmware/hdmi/cadence/dpfw.bin"
"firmware-imx-${fwHdmiVersion}/firmware/hdmi/cadence/dpfw.bin" "firmware-imx-${fwHdmiVersion}/firmware/hdmi/cadence/hdmi?xfw.bin"
"firmware-imx-${fwHdmiVersion}/firmware/hdmi/cadence/hdmi?xfw.bin" ]
] ++ pkgs.lib.optional (targetBoard == "imx8qm") (
++ pkgs.lib.optional (targetBoard == "imx8qm") ( "imx-sc-firmware-${fwScVersion}/mx8qm-mek-scfw-tcm.bin"
"imx-sc-firmware-${fwScVersion}/mx8qm-mek-scfw-tcm.bin" + " "
+ " " + "imx-seco-${fwSecoVersion}/firmware/seco/mx8qmb0-ahab-container.img"
+ "imx-seco-${fwSecoVersion}/firmware/seco/mx8qmb0-ahab-container.img" )
) ++ pkgs.lib.optional (targetBoard == "imx8qxp") (
++ pkgs.lib.optional (targetBoard == "imx8qxp") ( "imx-sc-firmware-${fwScVersion}/mx8qx-mek-scfw-tcm.bin"
"imx-sc-firmware-${fwScVersion}/mx8qx-mek-scfw-tcm.bin" + " "
+ " " + "imx-seco-${fwSecoVersion}/firmware/seco/mx8qxc0-ahab-container.img"
+ "imx-seco-${fwSecoVersion}/firmware/seco/mx8qxc0-ahab-container.img" );
);
installPhase = '' installPhase = ''
mkdir -p $out mkdir -p $out

View file

@ -61,20 +61,19 @@ pkgs.stdenv.mkDerivation {
--replace "\$(CROSS_COMPILE_\$(sm))cpp" ${cpp}/bin/cpp --replace "\$(CROSS_COMPILE_\$(sm))cpp" ${cpp}/bin/cpp
''; '';
makeFlags = makeFlags = [
[ "PLATFORM=${platform}"
"PLATFORM=${platform}" ]
] ++ lib.optionals (!hasFullPlatform) [
++ lib.optionals (!hasFullPlatform) [ "PLATFORM_FLAVOR=${flavor}"
"PLATFORM_FLAVOR=${flavor}" ]
] ++ [
++ [ "CFG_ARM64_core=y"
"CFG_ARM64_core=y" "CFG_TEE_TA_LOG_LEVEL=0"
"CFG_TEE_TA_LOG_LEVEL=0" "CFG_TEE_CORE_LOG_LEVEL=0"
"CFG_TEE_CORE_LOG_LEVEL=0" "CROSS_COMPILE=${toolchain}/bin/${toolchain.targetPrefix}"
"CROSS_COMPILE=${toolchain}/bin/${toolchain.targetPrefix}" "CROSS_COMPILE64=${toolchain}/bin/${toolchain.targetPrefix}"
"CROSS_COMPILE64=${toolchain}/bin/${toolchain.targetPrefix}" ];
];
installPhase = '' installPhase = ''
mkdir -p $out mkdir -p $out
@ -85,5 +84,6 @@ pkgs.stdenv.mkDerivation {
homepage = "https://github.com/nxp-imx/imx-optee-os"; homepage = "https://github.com/nxp-imx/imx-optee-os";
license = [ lib.licenses.bsd2 ]; license = [ lib.licenses.bsd2 ];
platforms = [ "aarch64-linux" ]; platforms = [ "aarch64-linux" ];
} // meta; }
// meta;
} }

View file

@ -57,7 +57,8 @@ stdenv.mkDerivation {
gnutls gnutls
perl perl
efitools efitools
] ++ extraNativeBuildInputs; ]
++ extraNativeBuildInputs;
depsBuildBuild = [ buildPackages.stdenv.cc ]; depsBuildBuild = [ buildPackages.stdenv.cc ];
hardeningDisable = [ "all" ]; hardeningDisable = [ "all" ];

View file

@ -45,7 +45,8 @@ let
}; };
} }
{ patch = ./irq-desc-to-data.patch; } { patch = ./irq-desc-to-data.patch; }
] ++ kernelPatches; ]
++ kernelPatches;
structuredExtraConfig = with lib.kernel; { structuredExtraConfig = with lib.kernel; {
# A ton of stuff just does not build. We disable it all. # A ton of stuff just does not build. We disable it all.