Go workspaces with flakes

Hello,
I am working on a number of Go modules that I want to maintain in a shared git repo. They have some dependencies, but should be usable in isolation.

I am struggling to combine the Go workspace concepts with flakes. Go can use relative path references between go modules in a workspace, but this does not work well if I have a flake for each module.

I was seaching Github for repos that have both go.work file and flake.nix but the Github search does not allow that.

Perhaps someone knows of an example of combining Go workspaces with flakes?

What’s your motivation for having a flake for each module? Sounds strange to me.

Today I have a separate git repo for each module, and they each have a flake. Now I want to combine them in a workspace.

But like you say possibly I don’t need a flake for each module, just because I had it before

But in that case, would be good to see how a single flake works in a Go workspace with multiple modules.