Goss

From NixOS Wiki

goss is a YAML based serverspec alternative tool for validating a server's configuration.

It is documented in the NixOS manual.