- cross-posted to:
- linux@lemmy.ml
- cross-posted to:
- linux@lemmy.ml
It looks like an opinionated personal Nix flake. Nothing wrong with that, although the vibecoding would make me hesitant to boot this flake on bare metal. Maybe it will be useful reading for some folks. Some specific critiques:
- browser: Brave by default? No thanks.
- python: Not using a nice Nix-built Python with reproducible environments? So why advertise reproducibility?
- updates: Not using the NixOS autoupdate framework? So why advertise the ability to run off SSH and a git repo?
- Many system scripts are written in Python or Bash. Python is not the worst choice (I still appreciate Gentoo!) but it can have a slow startup time that is not great for lightweight batch scripts. Bash is a middle-of-the-road choice, but it’s not especially fast or secure or easy-to-read; there are better choices in each of those directions, like Debian’s
dash,execline, or Oils. - Spend weirdness points in weirder ways. Replace systemd. Replace the shell. Configure some exotic networking protocol. There are interesting possible things that a new distro can do.
deleted by creator
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.txtis a pinned snapshot of another distro’s live-ISO package list.map.tomlrequires 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
byassertions 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.nixandtests/fleet.nixare 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/nullrather thangrep -q, because with pipefail set,grep -qexits 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.
- The tested system is the shipped system with NixOS test instrumentation added via


