disko/lib
meck 9a7ab516cf Set buildPlatform in make-disk-image
Currently if building an image using cross compilation:

nixpkgs = {
  config.allowUnsupportedSystem = true;
  hostPlatform = "armv7l-linux";
  buildPlatform = "x86_64-linux";
};

And resetting the Disko packages for binFmt use:

disko.imageBuilder =
  let
    diskoPkgs = nixpkgs.legacyPackages."x86_64-linux";
  in
  {
    enableBinfmt = true;
    pkgs = diskoPkgs;
    kernelPackages = diskoPkgs.linuxPackages_latest;
  };

Something will differ between host/build Platform in diskoPkgs (Not sure
what, they look the same when tracing but there is functions that maybe
differ) causing it to miss the nixpkgs cache and rebuilding for x86_64-linux.
Also resettings buildPlatform fixes this.
2025-03-12 08:35:27 +01:00
..
types types disk: fix deviceOrdering 2025-02-15 15:53:51 +00:00
binfmt.nix treewide: format all files 2025-02-15 10:08:56 +00:00
default.nix fix schellcheck warning failing build 2025-02-25 12:19:28 +00:00
interactive-vm.nix treewide: format all files 2025-02-15 10:08:56 +00:00
make-disk-image.nix Set buildPlatform in make-disk-image 2025-03-12 08:35:27 +01:00
tests.nix treewide: format all files 2025-02-15 10:08:56 +00:00