Managing Nix build resources with cgroups?

A first step would be to create one cpu cgroup per builder process to ensure some fairness between build jobs.

You could also create a systemd slice for each nixbld user (user-NIXBLD1_ID.slice), and put the resource limits there, no?