Commit 6295433b authored by Josh Hoffer's avatar Josh Hoffer
Browse files

installer: only use squashfs threads=multi on supported kernels

The `threads` SquashFS mount option was introduced in Linux 6.2 [1].
Since we still support older kernels and external users of nixpkgs
may reuse the ISO installer modules, this option should be guarded
by a kernel version check.

[1] https://www.kernelconfig.io/config_squashfs_choice_decomp_by_mount?arch=x86&kernelversion=6.10.10
parent 25b6a05d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -722,7 +722,7 @@ in
    "/nix/.ro-store" = lib.mkImageMediaOverride
      { fsType = "squashfs";
        device = "/iso/nix-store.squashfs";
        options = [ "loop" "threads=multi" ];
        options = [ "loop" ] ++ lib.optional (config.boot.kernelPackages.kernel.kernelAtLeast "6.2") "threads=multi";
        neededForBoot = true;
      };

+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ with lib;
    fileSystems."/nix/.ro-store" = mkImageMediaOverride
      { fsType = "squashfs";
        device = "../nix-store.squashfs";
        options = [ "loop" "threads=multi" ];
        options = [ "loop" ] ++ lib.optional (config.boot.kernelPackages.kernel.kernelAtLeast "6.2") "threads=multi";
        neededForBoot = true;
      };