modules.system.kernel: add patch asus

This commit is contained in:
2025-11-23 18:11:09 +08:00
parent 0bea81e0e1
commit 56ca103c46
4 changed files with 30 additions and 0 deletions

18
flake.lock generated
View File

@@ -553,6 +553,23 @@
"type": "github"
}
},
"linux-asus": {
"flake": false,
"locked": {
"lastModified": 1763490343,
"narHash": "sha256-aiCPWxyVBNfqB8Gw9OwrrEP3c+liUBZbEW6aTIrd+TE=",
"owner": "asus-linux",
"repo": "linux-g14",
"rev": "29faef816326f31b4d9d3e19c1f9a8ffe9005e8a",
"type": "gitlab"
},
"original": {
"owner": "asus-linux",
"ref": "6.17",
"repo": "linux-g14",
"type": "gitlab"
}
},
"mac-style": {
"flake": false,
"locked": {
@@ -1252,6 +1269,7 @@
"home-manager": "home-manager",
"impermanence": "impermanence",
"lepton": "lepton",
"linux-asus": "linux-asus",
"mac-style": "mac-style",
"matplotplusplus": "matplotplusplus",
"mirism-old": "mirism-old",

View File

@@ -68,6 +68,7 @@
pybinding = { url = "git+https://github.com/dean0x7d/pybinding?submodules=1"; flake = false; };
brokenaxes = { url = "github:bendichter/brokenaxes"; flake = false; };
mirism-old = { url = "github:CHN-beta/mirism-old-public"; flake = false; };
linux-asus = { url = "gitlab:asus-linux/linux-g14/6.17"; flake = false; };
};
outputs = inputs: let localLib = import ./flake/lib inputs.nixpkgs.lib; in

View File

@@ -10,5 +10,6 @@ inputs:
supergfxd.enable = false;
};
programs.rog-control-center = { enable = true; autoStart = true; };
nixos.system.kernel.patches = [ "asus" ];
};
}

View File

@@ -78,6 +78,16 @@ inputs:
};
structuredExtraConfig.BTRFS_EXPERIMENTAL = inputs.lib.kernel.yes;
}];
asus = builtins.map
(file:
{
name = "asus-${file.name}";
patch = "${inputs.topInputs.linux-asus}/${file.name}";
})
(builtins.filter
(file: file.value == "regular" && inputs.lib.hasSuffix ".patch" file.name
&& !(inputs.lib.hasInfix "more-uarches" file.name))
(inputs.localLib.attrsToList (builtins.readDir "${inputs.topInputs.linux-asus}")));
};
in builtins.concatLists (builtins.map (name: patches.${name}) kernel.patches);
};