mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-06 01:38:06 +00:00
[Boot] use zstd for module compression instead of xz
Faster and avoids using XZ in such a critical area.
This commit is contained in:
parent
e9d4ee4c44
commit
d6340f65d1
1 changed files with 16 additions and 0 deletions
16
boot.nix
16
boot.nix
|
|
@ -2,6 +2,18 @@
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
customKernelPatches = {
|
customKernelPatches = {
|
||||||
|
zstd = {
|
||||||
|
name = "zstd";
|
||||||
|
patch = null;
|
||||||
|
extraConfig = ''
|
||||||
|
MODULE_COMPRESS_XZ n
|
||||||
|
MODULE_COMPRESS_ZSTD y
|
||||||
|
ZSWAP_COMPRESSOR_DEFAULT_ZSTD y
|
||||||
|
FW_LOADER_COMPRESS_ZSTD y
|
||||||
|
ZRAM_DEF_COMP_ZSTD y
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
enableX32ABI = {
|
enableX32ABI = {
|
||||||
name = "enable-x32";
|
name = "enable-x32";
|
||||||
patch = null;
|
patch = null;
|
||||||
|
|
@ -262,6 +274,9 @@ in {
|
||||||
# Required for many features, like rootluks TPM-unlock, etc.
|
# Required for many features, like rootluks TPM-unlock, etc.
|
||||||
initrd.systemd.enable = true;
|
initrd.systemd.enable = true;
|
||||||
|
|
||||||
|
initrd.compressor = "zstd";
|
||||||
|
initrd.compressorArgs = [ "-T0" "-9" ];
|
||||||
|
|
||||||
kernelPackages = with myLib.debug; let
|
kernelPackages = with myLib.debug; let
|
||||||
baseKernel = cfg.kernel.package;
|
baseKernel = cfg.kernel.package;
|
||||||
|
|
||||||
|
|
@ -318,6 +333,7 @@ in {
|
||||||
++ optional (cfg.patches.amdClusterId.enable && kernelVersionOlder "6.4") customKernelPatches.amdClusterId
|
++ optional (cfg.patches.amdClusterId.enable && kernelVersionOlder "6.4") customKernelPatches.amdClusterId
|
||||||
++ optional (cfg.patches.zenLLCIdle.enable && kernelVersionOlder "6.5") customKernelPatches.backports.zenLLCIdle
|
++ optional (cfg.patches.zenLLCIdle.enable && kernelVersionOlder "6.5") customKernelPatches.backports.zenLLCIdle
|
||||||
++ optional (isXanmod cfg.kernel.package && config.aviallon.optimizations.enable) (customKernelPatches.optimizeForCPUArch config.aviallon.general.cpu.arch)
|
++ optional (isXanmod cfg.kernel.package && config.aviallon.optimizations.enable) (customKernelPatches.optimizeForCPUArch config.aviallon.general.cpu.arch)
|
||||||
|
++ optional config.aviallon.optimizations.enable customKernelPatches.zstd
|
||||||
;
|
;
|
||||||
|
|
||||||
loader.grub.enable = cfg.useGrub;
|
loader.grub.enable = cfg.useGrub;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue