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-28 14:25:17 +01:00
committed by Atemu
co-authored by Atemu
parent 9461f0a734
commit a6b5693a71
+6 -1
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: