File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,6 +77,12 @@ You can use this flake as a base for your own NixOS image or configuration.
7777 version = "6.6.7";
7878 sha256 = "...";
7979 extraKernelModules = [ "dummy" "loop" ];
80+ kernelPatches = [
81+ {
82+ name = "my-custom-patch";
83+ patch = ./path/to/my-patch.patch;
84+ }
85+ ];
8086 };
8187 };
8288 in {
@@ -124,6 +130,7 @@ You can override these options in your own configuration or flake:
124130| ` sha256 ` | ` str ` | SRI hash | SHA256 hash for the kernel tarball (must be in SRI format, e.g. ` sha256-... ` ). |
125131| ` extraKernelModules ` | ` list of str ` | ` [] ` | Extra kernel modules to load at boot (e.g. ` ["dummy"] ` ). |
126132| ` includeIntelModules ` | ` bool ` | ` true ` | Include Intel-specific kernel modules (rapl, pmc, lpss). |
133+ | ` kernelPatches ` | ` list of attrs ` | ` [] ` | List of kernel patches to apply. Each patch should have ` name ` and ` patch ` attributes. |
127134
128135---
129136
Original file line number Diff line number Diff line change 2828 default = true ;
2929 description = "Intel-specific kernel modules (rapl, pmc, lpss)." ;
3030 } ;
31+
32+ kernelPatches = lib . mkOption {
33+ type = lib . types . listOf lib . types . attrs ;
34+ default = [ ] ;
35+ description = "List of kernel patches to apply. Each patch should have 'name' and 'patch' attributes." ;
36+ example = lib . literalExpression ''[
37+ {
38+ name = "my-patch";
39+ patch = ./my-patch.patch;
40+ }
41+ ]'' ;
42+ } ;
3143 } ;
3244
3345 config = {
3951 url = "mirror://kernel/linux/kernel/v${ lib . versions . major version } .x/linux-${ version } .tar.xz" ;
4052 sha256 = cfg . sha256 ;
4153 } ;
54+ kernelPatches = cfg . kernelPatches ;
4255 } ;
4356 } ) ;
4457
You can’t perform that action at this time.
0 commit comments