mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-11 16:49:22 +08:00
modules.system.kernel: add 6.18 btrfs patch
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{ inputs }: let inherit (inputs.self.packages.x86_64-linux) pkgs; in
|
||||
{ inputs }: let inherit (inputs.self.packages.x86_64-linux) pkgs; inherit (inputs.nixpkgs) lib; in
|
||||
{
|
||||
nvhpc =
|
||||
{
|
||||
@@ -208,4 +208,25 @@
|
||||
finalImageTag = "v8.0.12";
|
||||
};
|
||||
};
|
||||
btrfs =
|
||||
{
|
||||
"6.12" =
|
||||
{
|
||||
patch = pkgs.fetchurl
|
||||
{
|
||||
url = "https://github.com/kakra/linux/pull/36.patch";
|
||||
sha256 = "0wimihsvrxib6g23jcqdbvqlkqk6nbqjswfx9bzmpm1vlvzxj8m0";
|
||||
};
|
||||
structuredExtraConfig.BTRFS_EXPERIMENTAL = lib.kernel.yes;
|
||||
};
|
||||
"6.18" =
|
||||
{
|
||||
patch = pkgs.fetchurl
|
||||
{
|
||||
url = "https://github.com/kakra/linux/pull/40.patch";
|
||||
sha256 = "00k57gx5xmwsdr83qc24dwkiin1qcyl929262m9kix699g7fclga";
|
||||
};
|
||||
structuredExtraConfig = { BTRFS_ALLOCATOR_HINTS = lib.kernel.yes; BTRFS_READ_POLICIES = lib.kernel.yes; };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -62,19 +62,12 @@ inputs:
|
||||
cachyos-rc = inputs.pkgs.linuxPackages_cachyos-rc;
|
||||
}.${kernel.variant};
|
||||
kernelPatches =
|
||||
let patches =
|
||||
{
|
||||
btrfs =
|
||||
[{
|
||||
name = "btrfs";
|
||||
patch = inputs.pkgs.fetchurl
|
||||
{
|
||||
url = "https://github.com/kakra/linux/pull/36.patch";
|
||||
sha256 = "0wimihsvrxib6g23jcqdbvqlkqk6nbqjswfx9bzmpm1vlvzxj8m0";
|
||||
};
|
||||
structuredExtraConfig.BTRFS_EXPERIMENTAL = inputs.lib.kernel.yes;
|
||||
}];
|
||||
};
|
||||
let
|
||||
version = inputs.lib.versions.majorMinor inputs.config.boot.kernelPackages.kernel.version;
|
||||
patches =
|
||||
{
|
||||
btrfs = [(inputs.topInputs.self.src.btrfs.${version} // { name = "btrfs"; })];
|
||||
};
|
||||
in builtins.concatLists (builtins.map (name: patches.${name}) kernel.patches);
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user