3
0
Fork 0
forked from mirrors/nixpkgs

nixos/stage-1: set zstd as the default compressor when supported

Co-authored-by: Atemu <atemu.main@gmail.com>
This commit is contained in:
Blaž Hrastnik 2020-12-16 12:37:09 +09:00 committed by Atemu
parent 9461f0a734
commit a6b5693a71

View file

@ -513,7 +513,12 @@ in
};
boot.initrd.compressor = mkOption {
default = "gzip";
default = (
if lib.versionAtLeast config.boot.kernelPackages.kernel.version "5.9"
then "zstd"
else "gzip"
);
defaultText = "zstd if the kernel supports it (5.9+), gzip if not.";
type = types.unspecified; # We don't have a function type...
description = ''
The compressor to use on the initrd image. May be any of: