Copy config into sdcard image

I got my custom sdcard image building, and I’d like to copy the flake I used to build it into the image but can’t see a good example of how to do it.

Any pointers/examples would be super helpful.


  # includes this flake in the live iso : "/etc/nixcfg"
  environment.etc.nixcfg.source =
      (path: type:
        baseNameOf path
        != ".git"
        && type != "symlink"
        && !(pkgs.lib.hasSuffix ".qcow2" path)
        && baseNameOf path != "secrets")

This repo might have a few examples of what you seek to do. It’s Pi Zero 2 related but, of course, things can be modified to meet your use case / needs.