Skip to main content

Category: Nix

Saved by NixOS Integration Tests, Surprisingly

Recently, tsnsrv has been getting a lot of high-quality contributions that add better support for Headscale and custom certificates, among other things. As they always do when things change, bugs crept in, and frustratingly, not in a way that existing tests could have caught: Instead of the go code (which has mildly decent test coverage), it was bugs in the nixos module!

This was a great opportunity to investigate if we can test the tsnsrv NixOS module, and maybe improve the baseline quality of the codebase as a whole.

A recent blog post series on the NixOS test driver (part1, part2) made the rounds showing off what it can do, so this felt like a tractable project to take on. Here’s my experience with it.