From fcf9cb19430c40601843d4360e57935868c42ba8 Mon Sep 17 00:00:00 2001 From: chn Date: Sun, 12 Oct 2025 09:56:19 +0800 Subject: [PATCH] modules.system.nixpkgs: remove native kernel patching --- modules/system/nixpkgs.nix | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/modules/system/nixpkgs.nix b/modules/system/nixpkgs.nix index cdf3b443..0788bf6e 100644 --- a/modules/system/nixpkgs.nix +++ b/modules/system/nixpkgs.nix @@ -20,23 +20,5 @@ inputs: inherit inputs; nixpkgs = nixpkgs // { nixRoot = null; nixos = true; inherit (inputs.config.nixos.model) arch; }; }; - boot.kernelPatches = inputs.lib.mkIf (nixpkgs.march != null) - ( - let configName = - if inputs.config.nixos.system.kernel.variant == "xanmod-unstable" then "structuredExtraConfig" - else "extraStructuredConfig"; - in - [{ - name = "native kernel"; - patch = null; - ${configName} = - let kernelConfig = { znver2 = "MZEN2"; znver3 = "MZEN3"; znver4 = "MZEN4"; znver5 = "MZEN5"; }; - in - { - GENERIC_CPU = inputs.lib.kernel.no; - ${kernelConfig.${nixpkgs.march} or "M${inputs.lib.toUpper nixpkgs.march}"} = inputs.lib.kernel.yes; - }; - }] - ); }; }