From 9461f0a73432f9d124b96f65884efba788f5c0cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Hrastnik?= Date: Sat, 12 Dec 2020 13:56:33 +0900 Subject: [PATCH] kernel: use zstd compression on 5.9+. --- pkgs/os-specific/linux/kernel/common-config.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index 47e49dbe01d..0fb83014662 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -654,7 +654,10 @@ let MODULE_COMPRESS = yes; MODULE_COMPRESS_XZ = yes; - KERNEL_XZ = yes; + + # use zstd for kernel compression if newer than 5.9, else xz. + KERNEL_XZ = whenOlder "5.9" yes; + KERNEL_ZSTD = whenAtLeast "5.9" yes; SYSVIPC = yes; # System-V IPC