mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-05 17:27:50 +00:00
[Boot] Verify that current kernel is Xanmod kernel before applying march config
This commit is contained in:
parent
e6f3e0719a
commit
485ee562bb
1 changed files with 3 additions and 1 deletions
4
boot.nix
4
boot.nix
|
|
@ -75,6 +75,8 @@ let
|
|||
else
|
||||
"${key}=${toCmdlineValue value}"
|
||||
) set;
|
||||
|
||||
isXanmod = kernel: ! isNull (strings.match ".*(xanmod).*" kernel.modDirVersion);
|
||||
|
||||
cfg = config.aviallon.boot;
|
||||
generalCfg = config.aviallon.general;
|
||||
|
|
@ -184,7 +186,7 @@ in {
|
|||
++ optional cfg.x32abi.enable customKernelPatches.enableX32ABI
|
||||
++ optional cfg.rtGroupSched.enable customKernelPatches.enableRTGroupSched
|
||||
++ optional cfg.energyModel.enable customKernelPatches.enableEnergyModel
|
||||
++ optional config.aviallon.optimizations.enable (customKernelPatches.optimizeForCPUArch config.aviallon.general.cpuArch)
|
||||
++ optional (isXanmod cfg.kernel && config.aviallon.optimizations.enable) (customKernelPatches.optimizeForCPUArch config.aviallon.general.cpuArch)
|
||||
;
|
||||
|
||||
loader.grub.enable = cfg.useGrub;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue