iso: default to zstd compression

For most users of nixos-generate zstd will be the better choice as
it will build and boot images much faster. Often users have to rebuild
images a couple of times before they are happy with the result.
NixOS might be better of with xz as it saves download and storage cost
for images.
This commit is contained in:
Jörg Thalheim 2024-05-19 13:49:36 +02:00
parent 722b512eb7
commit bb76f39145
2 changed files with 7 additions and 1 deletions

View File

@ -12,6 +12,9 @@
systemd.services.wpa_supplicant.wantedBy = lib.mkForce ["multi-user.target"];
systemd.services.sshd.wantedBy = lib.mkForce ["multi-user.target"];
# Much faster than xz
isoImage.squashfsCompression = lib.mkDefault "zstd";
formatAttr = "isoImage";
fileExtension = ".iso";
}

View File

@ -1,5 +1,5 @@
{
config,
lib,
modulesPath,
...
}: {
@ -13,6 +13,9 @@
# USB booting
isoImage.makeUsbBootable = true;
# Much faster than xz
isoImage.squashfsCompression = lib.mkDefault "zstd";
formatAttr = "isoImage";
fileExtension = ".iso";
}