Have you taken a look at NixOps[1] and Disnix[2]? They extend the concepts of Nix and NixOS into networks of machines and distributed services (TL;DR version).
If you are using only one system, the NixOS containers support might be enough, though.
If you are using only one system, the NixOS containers support might be enough, though.
https://github.com/NixOS/nixops/issues/565
It has links to solutions people are using, and other related issues.