Add a convention: comments posted to Gitea go out under the operator's account, so sign each with a — Claude sign-off to attribute them to the agent.
3.5 KiB
3.5 KiB
dotfiles-nixos
One flake that builds every machine the user owns.
The domain model (Host, Module, Skeleton, Auto-loader, Enable convention, overlays) lives in .claude/CONTEXT.md; the current deliverable's spec is .claude/spec/laptop-mvi.md.
Conventions
- In-file comments describe only the current content and behaviour of the file they sit in.
Do not write comments about history ("used to be X", "now moved here"), about how a value is consumed in other files, or that justify the choice against alternatives.
Never reference agent-facing state (anything under
.claude/orCLAUDE.md) from a code comment: that state is not part of understanding the code. A reader looking at only that file should find every comment accurate and self-contained. - Comments posted to Gitea (pull requests, issues, reviews) go out under the operator's account, so sign every one to make clear the author is the agent, not the operator.
End the comment with a
— Claudesign-off. (A dedicated bot account may replace this later; until then, the sign-off is the only marker.)
Gotchas
- Nix on the dev host needs experimental features passed per-command.
This repo is developed on
neogaiawhile it still runs CachyOS (the migration target), where Nix is the distro package at/usr/bin/nixin multi-user daemon mode. The system/etc/nix/nix.confdoes not enable flakes, so exportNIX_CONFIG="experimental-features = nix-command flakes"(or pass--extra-experimental-features 'nix-command flakes') for every command. - The dev user is a non-trusted daemon client (
nix store inforeportsTrusted: 0). You cannot add substituters from the CLI, so rely on what the flake/config declares (e.g. the chaotic cache is wired by the chaotic module, not a CLI flag). Caveat that bites when a Host actually selects the CachyOS kernel: the substituters anix buildfetches from are the daemon's (/etc/nix/nix.conf), not thenix.settingsof the config being built — those only govern the built system. This dev host's/etc/nix/nix.confhas nosubstituters/trusted-substituterslines, so building a toplevel whoseboot.kernelPackagesislinuxPackages_cachyoscompiles the kernel (and rustc bootstrap, etc.) from source instead of hittingnyx-cache. To build such a Host here, first addextra-substituters = https://nyx-cache.chaotic.cx/andextra-trusted-public-keys = nyx-cache.chaotic.cx:dJxTrgMC3V3cFfyIiBQDQorG6k1LsqurH/srpMSq7qk=to/etc/nix/nix.conf(sudo) andsudo systemctl restart nix-daemon.nix evalof the kernel version does not trigger this — only a real build does. - If
/nix/storeis missing ornix-daemonis inactive after a fresh Nix install, initialise it withsudo systemd-tmpfiles --create nix-daemon.conf && sudo systemctl enable --now nix-daemon.socket. - The primary build/verify seam for any Host is
nix flake check, which buildschecks.x86_64-linux.<host>(the system toplevel); cheap targeted checks usenix eval .#nixosConfigurations.<host>.config.... - chaotic-nyx must not follow our
nixpkgs, and its packages are built against chaotic's own pinned nixpkgs (its overlay defaults toonTopOf = "flake-nixpkgs", the cache-friendly path). That is what lets thenyx-cache.chaotic.cxbinary cache hit instead of compiling the CachyOS kernel from source; the tradeoff is that chaotic packages do not see ourunstable/stableoverlays. - The remote is self-hosted Gitea (
git.alexion.dev); the forge CLI istea(loginaxi), andghis not installed.