How to use vmTools.diskImageFuns? [soved]

edit: never mind, I used diskImages assuming it was a shorthand for diskImageFuns but I must have used it wrong. Replacing the function with diskImageFuns works as expected

still don’t understand the error tho…


ok, so I found vmTools.diskImageFuns which looks almost exactly like the thing I want but I have no idea how to use it (in a flake output).

I got this basic PoC flake:

{
  description = "Debian nix-builder";

  inputs = {
    nixpkgs = {
      type = "github";
      owner = "NixOS";
      repo = "nixpkgs";
      ref = "nixos-24.11";
     };
   };

  outputs = { self, nixpkgs }: 
    let
      system = "x86_64-linux";
      pkgs = import nixpkgs { inherit system; };
    in
  {
    packages.images.debian = pkgs.vmTools.diskImages.debian12x86_64 {};
  };
}

But that gives me an error which I don’t understand:

error: attempt to call something which is not a function but a set: { type = "derivation"; QEMU_OPTS = «thunk»; __ignoreNulls = true; __structuredAttrs = «thunk»; all = «thunk»; args = «thunk»; buildCommand = «thunk»; buildInputs = «thunk»; builder = «thunk»; cmakeFlags = «thunk»; «44 attributes elided» }
       at /nix/store/3yz8chs4n6kc4k2lk10g39nmj887imv0-source/flake.nix:22:30:
           21|   {
           22|     packages.images.debian = pkgs.vmTools.diskImages.debian12x86_64 {};
             |                              ^
           23|   };