

The idea I think is most transferable
modules/drivers/ is a drift watcher, and I have not seen this pattern used in a Nix repo before.
endeavouros.txt is a pinned snapshot of another distro’s live-ISO package list. map.toml requires every package in that snapshot to have an entry, and only those, and each entry must either say what provides it or say why it is deliberately absent:
[device-mapper]
by = ["package:lvm2", "option:services.lvm.enable"]
note = "device-mapper ships with lvm2"
[dracut]
skip = "an initramfs builder: NixOS builds its own initrd"
The by assertions are checked against a real Nix evaluation of the live system, so a claim that an option is set gets verified rather than trusted. A weekly GitHub Action diffs the snapshot against upstream’s current list and opens or updates a labelled issue when something needs a decision.
The general shape: pick a project whose coverage you want to match, pin its capability list, require every item to be either provided or explicitly skipped with a reason, and let CI tell you when upstream moves. It turns “am I missing hardware support” from a worry into a file where every gap has a dated decision attached. They run the same pattern for their pinned Python build.
The test suite
tests/default.nix and tests/fleet.nix are flake checks, x86_64-linux only, and they need KVM. They boot the real ISO in QEMU, install to a virtual disk unattended from a JSON answer file, reboot through LUKS, hibernate and resume through the encrypted disk, and run a multi-node fleet test with a server, an operator machine and a managed host going through enrollment, build, switch and password change.
Four techniques I took from it:
- The tested system is the shipped system with NixOS test instrumentation added via
extendModules, not a reduced copy built for testing. - Boot-time password prompts are answered through systemd’s ask-password protocol (
systemd-reply-passwordagainst the socket in/run/systemd/ask-password/) instead of typing on the serial console, which otherwise races the login prompt that also reads it. - The ISO is used as the backing file of a qcow2 overlay, so the “USB stick” is writable and the image under test is never mutated.
- Screenshots are build artifacts.
There is also a note in there that checks pipe into grep >/dev/null rather than grep -q, because with pipefail set, grep -q exits at the first match and the writer can die of a broken pipe and fail the check intermittently. That one has bitten me before and I had not worked out why.
What I would not take
- The people, groups, passwords and enrollment machinery, if you are a fleet of one.
users.mutableUsers = falsestands on its own; the rest is for an organisation. - SQLite state and secrets databases and an audit table, at small scale. Git history and journald cover it.
- Moving a host table out of Nix into TOML with a strict external schema. I tried the equivalent with PureNix and concluded it bought me nothing. Their validation idea is worth having; the format change is a separate question and I would not assume it is an improvement.
- A pull agent, without weighing what it costs. It is an always-running privileged daemon with network access, which is a real trade against a push model where nothing runs unattended.








Not quite the jab you think it is. This is the comment I posted earlier but decided to soften to protect your white fragility for the public… 🤣
Edit: The fragile white hypocrite @Mordikan@kbin.earth has started downvoting all of my comments! 🤣🤣🤣