A developer explores NixOS not through its installer or desktop environment, but by writing system-level tests. The core motivation is NixOS's reproducibility — all packages and configuration are pinned to exact commits — which enables test-driven OS updates: bump dependencies, run tests, only commit if they pass. Two concrete test examples are shown: a firewall test that spins up two VMs (one with firewall enabled, one without) to verify traffic is correctly blocked, and a DNS-over-HTTPS test that intercepts network traffic via a fake resolver to verify correct HTTPS resolution. The author plans to apply this workflow to a laptop with GitHub Actions running periodic dependency bumps and tests before auto-updating the machine.

8m read timeFrom advancedweb.hu
Post cover image
Table of contents
My motivation for NixOSTesting the firewallTesting DoHNext steps

Sort: