Question about building an ISO from a flake

I have been working on building an ISO from this repo: GitHub - tomasharkema/x1p42100-nixos · GitHub . This builds a custom ISO for a Microsoft Surface Pro 12, which normally wouldn’t even boot even with a conventional linux ARM ISO, but I was able to set up a custom non-NIX ISO that boots, and most of the peripherals work (cameras and NPU do not work currently).

I wanted to see if this repo would build a bootable ISO, and I was able to successfully build the image from this repo (I had to manually add in a ./modules/firmware.nix file from here: x1p42100-nixos/modules/firmware.nix at 8c7d582ec097d75e98c08570b721175c643af3c2 · Tokor0/x1p42100-nixos · GitHub). It boots into the NixOS gnome live image from the USB (loaded it in using Ventoy).

However, at some point, I had to modify the ./modules/firmware.nix file, and the ISO output kept being “built” with the same hash, which meant that it wasn’t incorporating the changes from the firmware.nix file, it was just using some sort of cached, prebuilt component. All of my attempts would successfully build ISOs, but none of them had the correct firmware from the change.

My question is this: Is there a way to know which cached, pre-built components nix uses prior to actually running a nix command. This way I can see where the build process is failing to incorporate changes, even if they are tracked with git. I know Nix caches very aggressively, so I was wondering if anyone here can shed some light on the caching process, where I can learn more, and what I can do to investigate this issue further!