Aaaand just when I ask this, I finally understand how everything fits together, thanks to another person’s brave trailblazing. I found https://github.com/Shawn8901/nix-configuration/tree/ae7e5c439c97d87bc52d6f7acef629abcf3370f6/.hydra, which has a perfect - working - example of what I want to accomplish:
- The spec.json defines the meta-jobset that tells hydra how to compute the jobsets that should apply to the repo, by referring to the jobsets.nix file
- The jobsets.nix file defines one jobset for the
main
branch and every PR that gets picked out from the meta-jobset’s inputs. - The only thing that needed adjusting a little bit was the flake references, which I adjusted to read
"git+ssh://git@github.com/antifuchs/home?ref=${branch}"
for themkFlakeJobset
function and"git+ssh://git@github.com/antifuchs/home?branch=pull/${num}/head"
for theprJobsets
function.
That’s all, now I have hydra builds for my personal repo, and it works remarkably well!