git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #108932 from Atemu/iso-image-compress-filter

iso-image: enable XZ compress filter

commitbb9601719890dc04241304bb1a5cf224683d5740 authorKevin Cox <kevincox@kevincox.ca> dateFri 15 Jan 2021, 11:32 (6 years ago) parent14970712fcab51
1 file changed+6−1
nixos/modules/installer/cd-dvd/iso-image.nix+6−1
nixos/modules/installer/cd-dvd/iso-image.nix+6−1
@@ -425,7 +425,12 @@ in
425425 };
426426
427427 isoImage.squashfsCompression = mkOption {
428− default = "xz -Xdict-size 100%";
428+ default = with pkgs.stdenv.targetPlatform; "xz -Xdict-size 100% "
429+ + lib.optionalString (isx86_32 || isx86_64) "-Xbcj x86"
430+ # Untested but should also reduce size for these platforms
431+ + lib.optionalString (isAarch32 || isAarch64) "-Xbcj arm"
432+ + lib.optionalString (isPowerPC) "-Xbcj powerpc"
433+ + lib.optionalString (isSparc) "-Xbcj sparc";
429434 description = ''
430435 Compression settings to use for the squashfs nix store.
431436 '';