mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 04:39:23 +08:00
move kernel patches
This commit is contained in:
@@ -169,6 +169,7 @@
|
||||
kernel =
|
||||
{
|
||||
cpu = [ "intel" ];
|
||||
patches = [ "hdmi" "cjktty" ];
|
||||
};
|
||||
};}
|
||||
)
|
||||
|
||||
@@ -12,18 +12,8 @@ inputs:
|
||||
options iwlmvm power_scheme=1
|
||||
options iwlwifi uapsd_disable=1
|
||||
'';
|
||||
boot.kernelPatches =
|
||||
boot.kernelPatches = inputs.lib.mkAfter
|
||||
[
|
||||
{ name = "hdmi"; patch = ./hdmi.patch; }
|
||||
{
|
||||
name = "cjktty";
|
||||
patch = inputs.pkgs.fetchurl
|
||||
{
|
||||
url = "https://raw.githubusercontent.com/zhmars/cjktty-patches/master/v6.x/cjktty-6.4.patch";
|
||||
sha256 = "sha256-oGZxvg6ldpPAn5+W+r/e/WkVO92iv0XVFoJfFF5rdc8=";
|
||||
};
|
||||
extraStructuredConfig = { FONT_CJK_16x16 = inputs.lib.kernel.yes; FONT_CJK_32x32 = inputs.lib.kernel.yes; };
|
||||
}
|
||||
{
|
||||
name = "custom config";
|
||||
patch = null;
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
{ pkgs, ... }@inputs:
|
||||
inputs:
|
||||
{
|
||||
options.nixos.kernel = let inherit (inputs.lib) mkOption types; in
|
||||
{
|
||||
cpu = mkOption { type = types.listOf (types.enum [ "intel" "amd" ]); default = []; };
|
||||
patches = mkOption { type = types.listOf (types.enum [ "hdmi" "cjktty" ]); default = []; };
|
||||
};
|
||||
config =
|
||||
{
|
||||
@@ -10,6 +11,26 @@
|
||||
{
|
||||
kernelParams = [ "delayacct" "acpi_osi=Linux" ];
|
||||
kernelPackages = inputs.pkgs.linuxPackages_xanmod_latest;
|
||||
kernelPatches =
|
||||
(
|
||||
let
|
||||
patches =
|
||||
{
|
||||
"hdmi" = { patch = ./hdmi.patch; };
|
||||
"cjktty" =
|
||||
{
|
||||
patch = inputs.pkgs.fetchurl
|
||||
{
|
||||
url = "https://raw.githubusercontent.com/zhmars/cjktty-patches/master/v6.x/cjktty-6.4.patch";
|
||||
sha256 = "sha256-oGZxvg6ldpPAn5+W+r/e/WkVO92iv0XVFoJfFF5rdc8=";
|
||||
};
|
||||
extraStructuredConfig =
|
||||
{ FONT_CJK_16x16 = inputs.lib.kernel.yes; FONT_CJK_32x32 = inputs.lib.kernel.yes; };
|
||||
};
|
||||
};
|
||||
in
|
||||
builtins.map (name: { inherit name; } // patches.${name}) inputs.config.nixos.kernel.patches
|
||||
);
|
||||
};
|
||||
hardware.cpu = builtins.listToAttrs (builtins.map
|
||||
(name: { inherit name; value = { updateMicrocode = true; }; })
|
||||
|
||||
Reference in New Issue
Block a user