surface: remove patch from nixos-hardware

This commit is contained in:
陈浩南 2024-01-20 10:04:00 +08:00
parent 26150244cb
commit 9d8442b1cf

View File

@ -1,6 +1,5 @@
inputs:
{
imports = inputs.localLib.mkModules [ inputs.topInputs.nixos-hardware.nixosModules.microsoft-surface-pro-intel ];
config =
{
nixos =
@ -62,21 +61,5 @@ inputs:
};
bugs = [ "xmunet" ];
};
boot.kernelPackages =
let
originalKernel = inputs.pkgs.linuxPackages_xanmod_latest.kernel;
version = originalKernel.version;
majorVersion =
let versionArray = builtins.splitVersion version;
in "${builtins.elemAt versionArray 0}.${builtins.elemAt versionArray 1}";
repoFile = "${inputs.topInputs.nixos-hardware}/microsoft/surface/common/kernel/linux-package.nix";
inherit (inputs.pkgs.callPackage repoFile {}) repos;
patchDir = repos.linux-surface + "/patches/${majorVersion}";
patchFile = "${inputs.topInputs.nixos-hardware}/microsoft/surface/common/kernel/linux-6.6.x/patches.nix";
kernelPatches = inputs.pkgs.callPackage patchFile { inherit (inputs.lib) kernel; inherit version patchDir; };
in
inputs.lib.mkForce (inputs.pkgs.linuxPackagesFor (originalKernel.override
(prev: { kernelPatches = prev.kernelPatches ++ kernelPatches; })));
systemd.services.iptsd.enable = false;
};
}